|
Java学习者论坛
处理页
<%@page contentType="text/HTML;charset=gb2312"%>
<html>
<head>
<title>登陆</title>
</head>
<body>
<center>
用户名及密码固定
<%
String name = request.getPatameter("uname");
String password = request.getPatameter("upass");
if("haoqiang".equals(name)&&"ai".equals(password))
{
session.setAttribute("flag","ok");
response.sendRedirect("login_success.jsp");
}
else
{
%>
登陆失败
<%
}
%>
</body>
</html>
</center>
</body>
</html>
处理后显示1
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 13 in the jsp file: /demo01/login_conf.jsp
The method getPatameter(String) is undefined for the type HttpServletRequest
10:
11:
12: <%
13: String name = request.getPatameter("uname");
14: String password = request.getPatameter("upass");
15: if("haoqiang".equals(name)&&"ai".equals(password))
16: {
An error occurred at line: 14 in the jsp file: /demo01/login_conf.jsp
The method getPatameter(String) is undefined for the type HttpServletRequest
11:
12: <%
13: String name = request.getPatameter("uname");
14: String password = request.getPatameter("upass");
15: if("haoqiang".equals(name)&&"ai".equals(password))
16: {
17: session.setAttribute("flag","ok");
问题出在哪啊? 是不是要导入什么包???
Java学习者论坛欢迎来到Java学习者论坛,转载请注明地址:http://www.javaxxz.com. |
|