glassfish
  1. glassfish
  2. GLASSFISH-17163

DispatchForward and then async dispatch does not work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.2_b02
    • Component/s: web_container
    • Labels:
      None

      Description

      In javadoc of AsyncContext#dispatch, it describes the scenario of dispatch forward and then async dispatch.
      In 3.0.1, there is no exception. But the message is not written back to client.
      In trunk, the following exception is seen:
      java.lang.IllegalStateException: Internal
      org.glassfish.grizzly.http.server.Response has not been set
      at org.glassfish.grizzly.http.server.Response.checkResponse(Response.java:1607)
      at org.glassfish.grizzly.http.server.Response.isCommitted(Response.java:663)
      at org.apache.catalina.connector.Response.isCommitted(Response.java:771)
      at org.apache.catalina.connector.Response.isAppCommitted(Response.java:413)
      at org.apache.catalina.connector.ResponseFacade.isCommitted(ResponseFacade.java:357)

        Activity

        Hide
        Shing Wai Chan added a comment -

        fix in 3.1.2:
        Sending web/web-core/src/main/java/org/apache/catalina/connector/AsyncContextImpl.java
        Sending web/web-core/src/main/java/org/apache/catalina/connector/Request.java
        Sending web/web-core/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java
        Transmitting file data ...
        Committed revision 48651.

        fix in trunk:
        Sending web/web-core/src/main/java/org/apache/catalina/connector/AsyncContextImpl.java
        Sending web/web-core/src/main/java/org/apache/catalina/connector/Request.java
        Sending web/web-core/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java
        Transmitting file data ...
        Committed revision 48652.

        add test case:
        Adding dispatchForwardAsyncDispatch
        Adding dispatchForwardAsyncDispatch/WebTest.java
        Adding dispatchForwardAsyncDispatch/build.properties
        Adding dispatchForwardAsyncDispatch/build.xml
        Adding dispatchForwardAsyncDispatch/docroot
        Adding dispatchForwardAsyncDispatch/servlet
        Adding dispatchForwardAsyncDispatch/servlet/test
        Adding dispatchForwardAsyncDispatch/servlet/test/AsyncDispatch.java
        Adding dispatchForwardAsyncDispatch/servlet/test/DispatchForward.java
        Transmitting file data .....
        Committed revision 48653.

        Show
        Shing Wai Chan added a comment - fix in 3.1.2: Sending web/web-core/src/main/java/org/apache/catalina/connector/AsyncContextImpl.java Sending web/web-core/src/main/java/org/apache/catalina/connector/Request.java Sending web/web-core/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java Transmitting file data ... Committed revision 48651. fix in trunk: Sending web/web-core/src/main/java/org/apache/catalina/connector/AsyncContextImpl.java Sending web/web-core/src/main/java/org/apache/catalina/connector/Request.java Sending web/web-core/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java Transmitting file data ... Committed revision 48652. add test case: Adding dispatchForwardAsyncDispatch Adding dispatchForwardAsyncDispatch/WebTest.java Adding dispatchForwardAsyncDispatch/build.properties Adding dispatchForwardAsyncDispatch/build.xml Adding dispatchForwardAsyncDispatch/docroot Adding dispatchForwardAsyncDispatch/servlet Adding dispatchForwardAsyncDispatch/servlet/test Adding dispatchForwardAsyncDispatch/servlet/test/AsyncDispatch.java Adding dispatchForwardAsyncDispatch/servlet/test/DispatchForward.java Transmitting file data ..... Committed revision 48653.

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            Shing Wai Chan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: