You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/04/16 05:18:43 UTC

DO NOT REPLY [Bug 44829] New: HEAD request with STRICT_SERVLET_COMPLIANCE set causes ServletException if servlet performs a forward

https://issues.apache.org/bugzilla/show_bug.cgi?id=44829

           Summary: HEAD request with STRICT_SERVLET_COMPLIANCE set causes
                    ServletException if servlet performs a forward
           Product: Tomcat 6
           Version: 6.0.14
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: lnelson@fairfaxdigital.com.au


1) run tomcat with the org.apache.catalina.STRICT_SERVLET_COMPLIANCE system
property set to true
2) have some kind of "/index.jsp" page
3) have this servlet configured:
public class StrictForwardTestServlet extends HttpServlet
{
        protected void doGet(final HttpServletRequest req, final
HttpServletResponse resp) throws ServletException, IOException
        {
                req.getRequestDispatcher("/index.jsp").forward(req, resp);
        }
}
4) issue a GET on that servlet: success, you get the index.jsp content
5) issue a HEAD on that servlet: error (see below)

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.doForward(ApplicationDispatcher.java:316)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
        at
com.example.StrictForwardTestServlet.doGet(StrictForwardTestServlet.java:13)
        at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:271)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        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:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        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:263)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker

I think this bug was introduced by the fix for bug 34956.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 44829] HEAD request with STRICT_SERVLET_COMPLIANCE set causes ServletException if servlet performs a forward

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44829


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




--- Comment #1 from Mark Thomas <ma...@apache.org>  2008-04-16 00:18:27 PST ---


*** This bug has been marked as a duplicate of bug 44562 ***


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org