2009-11-20 15:53:04 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
at org.apache.jsp.main_jsp._jspService(main_jsp.java:188)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
......
2009-11-20 15:53:04 org.apache.catalina.core.ApplicationContext log
信息: org.apache.jasper.JasperException: An exception occurred processing JSP page /main.jsp at line 33
30: .get(Constants.WEBUSER_KEY);
31: //娌℃湁鐧诲綍鎴栧尶鍚嶇敤鎴疯緭鍏ヨ繖涓湴鍧?垯鐩存帴杞悜棣栭〉
32: if(null==webuser||"anonymous".equals(webuser.getUser().getName())){
33: response.sendRedirect(request.getContextPath()+ "/HomePage.jsp");
34: return;
35: }
36: String userDisplayName = "";
Stacktrace:
网上查了一下有人说在
response.sendRedirect(request.getContextPath()+ "/HomePage.jsp");后面加上
return;即可解决报错问题,但是在我加上之后依然报该错,最后看到这篇文章: