tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Tansley <rtans...@MIT.EDU>
Subject Possible bug: wrapped requests and jsp:include
Date Thu, 15 Aug 2002 14:23:05 GMT

I've found behaviour which might be a bug in Tomcat 4.0.4.  I have a
filter that wraps a request using the "correct way"
(HttpServletRequestWrapper.) The wrapper overrides getParameter (etc.)
The wrapped request then goes to a JSP, "one.jsp".  one.jsp includes
another JSP like this:

<jsp:include page="/two.jsp">
  <jsp:param name="foo" value="bar" />

The problem is that two.jsp only sees the parameters provided by the
wrapper; it can't see the parameter "foo".  i.e., in two.jsp:

<%= request.getParameter("foo") %>

is "null".  This seems incorrect to me - surely the parameters set via
jsp:param should override any set by the wrapper.  I can't find anything
explicit in the spec, though.

It sounds like for jsp:include, Tomcat 4.0.4 is invoking methods on the
internal HttpServletRequest implementation, rather than what I would
expect, which is to use another wrapper around whatever HttpServletRequest
object the JSP/servlet is currently processing.

So is this a bug?  I can send a simple webapp demonstrating this to anyone

 Robert Tansley / Hewlett Packard Laboratories / Tel. (+1)617 253 4439

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message