withjava.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already been obtained

Coderanch | Peter den Haan | 1 decade ago
  1. 0

    forward() vs include()

    Coderanch | 1 decade ago | Peter den Haan
    withjava.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already been obtained

    Root Cause Analysis

    1. withjava.lang.IllegalStateException

      Cannot forward as OutputStream or Writer has already been obtained

      at org.apache.tomcat.facade.RequestDispatcherImpl.forward()
    2. org.apache.tomcat
      RequestDispatcherImpl.forward
      1. org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:150)
      1 frame
    3. test.forward
      DoubleForward.doGet
      1. test.forward.DoubleForward.doGet(DoubleForward.java:20)
      1 frame
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2 frames