⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getrequest.jsp

📁 提供 精通Java Web动态图表编程 一书的源代码, 大家赶快下载呀
💻 JSP
字号:
<!--
	Fig. 6.03_03: getRequest.jsp
	功能: 获取客户端Request参数
-->
<%@ page language="java"  contentType="text/html;charset=GB2312"%>
<HTML>
<HEAD>
<TITLE> 调用Servlet生成生成甘特图 </TITLE>
</HEAD>

<BODY>
<%
    //request.setCharacterEncoding("gb2312");
	String name = request.getParameter("name");
    String level = request.getParameter("level");
    if (name == null || name.equals(""))
    {
      name = "Java爱好者";
    }
    out.println("<h1>您好," + (name) + "<br>您提交的信息如下:<br>");
	out.println("您的Java编程水平为:<br>" + (level) + "</h1>");


%>
</BODY>
</HTML>
<%!
  // 字符内码转换
  public String convertTo8859(String strInput)
  {
    try
    {
      String tempStr = strInput;
      byte[] tempStrBytes = tempStr.getBytes("ISO8859-1");
      String strOutput = new String(tempStrBytes);
      return strOutput;
    }
    catch (Exception e)
    {
      return "";
    }
  }
%>
<!--
/**************************************************************************
 * (C) Copyright 2004-2005 by Jingkui Zhong(钟京馗) and Huan Tang(唐桓).  *
 * All Rights Reserved.                                                   *
 *                                                                        *
 * DISCLAIMER: The authors of this code have used their                   *
 * best efforts in preparing the code. These efforts include the          *
 * development, research, and testing of the theories and programs        *
 * to determine their effectiveness. The authors and publisher make       *
 * no warranty of any kind, expressed or implied, with regard to these    *
 * programs or to the documentation contained in these codes. The authors *
 * shall not be liable in any event for incidental or consequential       *
 * damages in connection with, or arising out of, the furnishing,         *
 * performance, or use of these programs.                                 *
 **************************************************************************/
-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -