β

servlet如何正确处理302跳转

Harries Blog™ 287 阅读

某天,将线上的resin容器替换为 tomcat .过了一段 时间 发现有个接口处理失败,提示异常.查看应用日志发现如下的日志:

Caused by: javax.servlet.ServletException: java.lang.IllegalStateException: Cannot create a session after the response has been committed
        at org.apache.jsp.WEB_002dINF.content.order.page.error_jsp._jspService(error_jsp.java:293) ~[na:na]
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) ~[jasper.jar:8.5.12]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) ~[servlet-api.jar:na]
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) ~[jasper.jar:8.5.12]
        ... 38 common frames omitted
作者:Harries Blog™
追心中的海,逐世界的梦
原文地址:servlet如何正确处理302跳转, 感谢原作者分享。