geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Utkin (JIRA)" <j...@apache.org>
Subject [jira] Created: (GERONIMO-3896) Error processing HEAD method by default HttpServlet#doHead()
Date Wed, 05 Mar 2008 09:43:40 GMT
Error processing HEAD method by default HttpServlet#doHead()
------------------------------------------------------------

                 Key: GERONIMO-3896
                 URL: https://issues.apache.org/jira/browse/GERONIMO-3896
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: specs
    Affects Versions: 2.0.2
         Environment: Geronimo 2.0.2/Tomcat, Geronimo 2.1?
            Reporter: Andrey Utkin


I have Servlet with use RequestDispatcher.include()/forward() to JSP.
My Servlet extends HttpServlet. I don`t overwrite doHead() method.
While processing HEAD method following exception throws:
{code}
09:18:57,647 ERROR [[SimpleDispatchServlet]] Servlet.service() for servlet SimpleDispatchServlet
threw exception
javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse
not passed to 
RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
        at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:985)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:493)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
        at com.km.webapp.test.simple.SimpleDispatchServlet.doGet(SimpleDispatchServlet.java:26)
        at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:274)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
        at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:353)
        at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
{code}

Exploring code I found that Tomcat`s implementation of RequestDispatcher expects that passed
Response/Request objects is original objects or is wrapped by ServletRequestWrapper/ServletResponseWrapper.
But geronimo-servlet_2.5_spec/HttpServlet.java#doHead() use NoBodyResponse class which is
not instance of  ServletResponseWrapper. So, exception thrown.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message