org.apache.catalina.core.StandardWrapperValve invo

2015-3-25 14:09:59 org.apache.catalina.core.StandardWrapperValve invoke

严重: Servlet.service() for servlet [jsp] in context with path [/JDBC_userLogin] threw exception [Unable to compile class for JSP: 


An error occurred at line: 22 in the jsp file: /login/handleLogin.jsp

Unreachable code

19:  request.getRequestDispatcher("login.jsp").forward(request, response);

20:  return;

21:  }

22: %>



Stacktrace:] with root cause

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


An error occurred at line: 22 in the jsp file: /login/handleLogin.jsp

Unreachable code

19:  request.getRequestDispatcher("login.jsp").forward(request, response);

20:  return;

21:  }

22: %>



Stacktrace:

at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)

at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)

at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:476)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)

at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:619)




搞了半天原来是少了一个java.util.*包,难怪每次报错都是jsp编译不通过!
网上看了下还有其他错误原因:
1.servlet或jsp中,重复调用response的 getOutputStream(),response.getWriter()方法

2.form表单里没有 method="post" action=""参数
3.看JDBC操纵数据库的代码,仔细看,例如调用的对象的属性为null。

  Connection conn=null; 之后之就调用了conn.??的方法 


你可能感兴趣的:(invoke)