Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-690

Encountered JasperException shown in server log when calling Servlet forward after JSP include call, but the response is success.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 1.3.20.Final
    • Servlet
    • None
    • Hide
      Show
      Deploy request-include-forward-stackoverflow.war attached in UNDERTOW-650 Open http://localhost:8080/request-include-forward-stackoverflow/ Click the link "JSP include then Servlet forward" The response is being forward successfully, but server throw JasperException in the server log

      This is the follow up issue of UNDERTOW-650, after fixing that, we found the "JSP include then Servlet forward" case working but server thow JasperException in the server log.

      17:45:33,301 ERROR [io.undertow.request] (default task-50) UT005023: Exception handling request to /request-include-forward-stackoverflow/_forward.jsp: java.lang.IllegalStateException: JBWEB004052: Exception occurred when flushing data
      	at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)
      	at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:121)
      	at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:75)
      	at org.apache.jsp.includeThenForward_jsp._jspService(includeThenForward_jsp.java:124)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:402)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:346)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      	at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.IOException: JBWEB004226: Stream closed
      	at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:181)
      	at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:102)
      	at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:183)
      	... 37 more
      

      The expected result should be forward the request successfully, while server did not throw an exception.

            sdouglas1@redhat.com Stuart Douglas
            sammyhk Sammy Chu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: