开发者社区> 问答> 正文

哪位大侠可以给我解释下这个异常是什么原因造成的吗?:报错

org.apache.jasper.JasperException: java.lang.IllegalStateException
      at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:197)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:171)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:73)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:880)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2081)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException
      at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
      at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:126)
      at org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(RedirectSupport.java:119)
      at org.apache.jsp.web.news_jsp._jspx_meth_c_005fredirect_005f0(news_jsp.java:1123)
      at org.apache.jsp.web.news_jsp._jspx_meth_c_005fif_005f7(news_jsp.java:1095)
      at org.apache.jsp.web.news_jsp._jspService(news_jsp.java:282)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      ... 25 more

展开
收起
kun坤 2020-06-14 10:17:01 420 0
1 条回答
写回答
取消 提交回答
  • 已经往 response 写了一些数据后,再调用 sendRedirect 就会发生这种问题。

    ######

    引用来自“鉴客”的答案

    已经往 response 写了一些数据后,再调用 sendRedirect 就会发生这种问题。

    谢了。

    2020-06-14 10:17:10
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载