tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21782] New: - HttpServletRequestWrapper subclass conflicts with <jsp:include>
Date Mon, 21 Jul 2003 21:29:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21782>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21782

HttpServletRequestWrapper subclass conflicts with <jsp:include>

           Summary: HttpServletRequestWrapper subclass conflicts with
                    <jsp:include>
           Product: Tomcat 4
           Version: 4.1.18
          Platform: PC
               URL: http://tesuque.stanford.edu/~dyoo/tomcat_wrapper_bug.tar
                    .gz
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: dyoo@hkn.eecs.berkeley.edu


I'm running into some behavior that appears to be a bug in Tomcat 4.1.


I've written a small WAR to demonstrate the problem:

    http://tesuque.stanford.edu/~dyoo/tomcat_wrapper_bug.war

The source code to this package is:

    http://tesuque.stanford.edu/~dyoo/tomcat_wrapper_bug.tar.gz


The situation is the following:

    Given a regular HttpServletRequest object, I wrap my own
    HttpServletRequestWrapper around it.  This wrapper includes a
    setParameter() method that lets me define my own parameters.

    Once I've reassigned a few parameters (like "name"), I do an
    RequestDispatcher.include() to my presentation JSP.

    Within that presentation jsp, I do another include to a small JSP
    page.  I also do some overriding some parameters using jsp:param.

The bug is that the jsp:param tags don't appear to be taking any effect in
my small jsp page!


I've determined that the HttpServletRequest that is being passed to the
small jsp page is my own wrapped request object, so there's no way the
jsp:param-ed variables can be passed on.


In a normal situation, the code that handles jsp:include will construct
its own wrapped request object to pass off any jsp:param'ed parameters.
However, for some reason, Tomcat appears not to do this wrapping process
on an HttpServletRequest that is already wrapped with
HttpServletRequestWrapper.  I've looked at the Tomcat source code, and I
do see some potential problems in the request wrapping code.

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


Mime
View raw message