tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Kerr <ak...@fluid.com>
Subject RequestDispatcher.forward() problem
Date Wed, 21 Feb 2001 14:26:07 GMT
Hello,

I've been having a bit of trouble with the RequestDispatcher.forward()
method.  If I try to forward to a URL with a query string on it, and
then have some code that processes the forwarded request, the
getQueryString() method does not return the query string.  However, the
parameters _are_ available via getParameter().

Section 8.1.1 of the Servlet 2.2 spec does not explicitly state what the
getQueryString() method should return in the event of a forward, but it
seems to me that if the new request parameters are added to the
request's internal list of parameters, that it only makes sense to also
add the parameters to the query string.

Section 8.4 of the spec states that "the path elements of the request
object reflect those of the original request."  Although a query string
is not strictly considered a "path element" according to the spec, it
does seem in the spirit of section 8.4 that the additional parameters
should be on the query string.

Does anyone have any thoughts on this?

Thanks,
Andrew



Mime
View raw message