Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4935

JSP rendering via AsyncContext.dispatch returns blank page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.1.1.Final
    • Web
    • None

      The scenario involves:

      1. ServletA forwards to Servlet B
      2. ServletB calls request.startAsync and starts new thread
      3. New thread renders JSP

      For the JSP rendering if asyncContext.dispatch is used I get a blank page in the browser.
      However if request.getRequestDispatcher is used along with forward/include, rendering succeeds.

      I didn't see any exception in standalong/log/server.log but maybe I didn't enable logging correctly.

      Here you can find a project to use along with instructions:
      https://github.com/rstoyanchev/dispatch-test

      Beyond the bug I would like to confirm it is safe to use request.getRequestDispatcher from an async thread.
      The spec doesn't say otherwise and it seems to work in AS 7.

      This Servlet Spec discussion provides more detail behind this question:
      http://java.net/projects/servlet-spec/lists/users/archive/2012-05/message/10

            rmaucher Remy Maucherat
            px9de Rossen Stoyanchev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: