The method getparameter(String) is undefined for the type HttpServletRequest

The method getparameter(String) is undefined for the type HttpServletRequest

<@ page contentType ="test/html;charset=gb2312" language="java" import='java.*.*'%>
<%!
	public String codeToString(String str){
		String tempString = str;
		try{
			byte tempB[] = tempString.getBytes("ISO-8859-1");
			tempString = new String(tempB);
			return tempString;
			}catch (Exception e){
				return tempString;
			}	
	}
 %>
 
 
 
 
请输入你的姓名(please enter your name):

<% if(request.getparameter("username")==null){ out.println("你还没有输入姓名"); out.println("You haven't entered your name!"); } else{ out.println("你的姓名为(Your name is):"+codeToString(request.getParameter("username"))); } %>

查了很久,才发现我这个是大小写写错了,是getParameter(),P要大写,下面是查到的没写错的其他解决方法
The method getparameter(String) is undefined for the type HttpServletRequest_第1张图片

你可能感兴趣的:(JspBUG)