|
Java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.Java:405)
at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.Java:725)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.Java:488)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.Java:467)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:188)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.Java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.Java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.Java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.Java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.Java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.Java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.Java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.Java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.Java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.Java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.Java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.Java:665)
at org.apache.tomcat.util.NET.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.Java:528)
at org.apache.tomcat.util.NET.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.Java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.Java:689)
at Java.lang.Thread.run(Thread.Java:595)
網上一查,是說頁面兩次調用了response.sendRedirect()方法,在后面加了一個return null 后,問題成功解決。
因此想,應該在頁面跳轉時如果報同類型的異常,應該可以用同種方法解決。
jsp技術:java Struts2 在攔截器里的跳轉問題,轉載需保留來源!
鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。