日期:2014-05-16  浏览次数:20299 次

请教前辈!关于java jsp 的问题....
--------------------------------------------

type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 12 in the jsp file: /xxoo.jsp
rerequest cannot be resolved
9: <body>
10: <%@ page import="classes.*"%>
11: <%
12: String name = rerequest.getParameter("name");
13: String pass=request.getParameter("password");
14: int i = 0;
15: if(name.length == 0) out.println("浣犺緭鍏ョ殑鐢ㄦ埛鍚嶄负绌烘垨涓嶅悎娉曪紒锛侊紒锛?);


An error occurred at line: 15 in the jsp file: /xxoo.jsp
name.length cannot be resolved or is not a field
12: String name = rerequest.getParameter("name");
13: String pass=request.getParameter("password");
14: int i = 0;
15: if(name.length == 0) out.println("浣犺緭鍏ョ殑鐢ㄦ埛鍚嶄负绌烘垨涓嶅悎娉曪紒锛侊紒锛?);
16: else if(pass.length == 0) out.println("浣犺緭鍏ョ殑瀵嗙爜涓虹┖鎴栦笉鍚堟硶锛侊紒锛侊紒");
17: else
18: {


An error occurred at line: 16 in the jsp file: /xxoo.jsp
pass.length cannot be resolved or is not a field
13: String pass=request.getParameter("password");
14: int i = 0;
15: if(name.length == 0) out.println("浣犺緭鍏ョ殑鐢ㄦ埛鍚嶄负绌烘垨涓嶅悎娉曪紒锛侊紒锛?);
16: else if(pass.length == 0) out.println("浣犺緭鍏ョ殑瀵嗙爜涓虹┖鎴栦笉鍚堟硶锛侊紒锛侊紒");
17: else
18: {
19: i = xxoo.chaxun(name,pass);


An error occurred at line: 19 in the jsp file: /xxoo.jsp
xxoo cannot be resolved
16: else if(pass.length == 0) out.println("浣犺緭鍏ョ殑瀵嗙爜涓虹┖鎴栦笉鍚堟硶锛侊紒锛侊紒");
17: else
18: {
19: i = xxoo.chaxun(name,pass);
20: if(i == 1) response.sendRedirect( "a1.jsp "); 
21: else response.sendRedirect( "a2.jsp "); 
22: }


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.


--------------------------------------------

Apache Tomcat/6.0.10



请问上面为什么报错啊????-

------解决方案--------------------
12: String name = rerequest.getParameter("name");
急晕了吧。很明显rerequest写错了,应该是request。
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html