Finally (and I'll drop this thread afterward). Its interesting to note
that on Tomcat 4.1, the parameter map supplied via the
request.getParameterMap() in a JSP page is in fact "mutable" while that
returned in a Servlet request object is not! You can actually remove the
request parameters from the request object in a JSP page! I assume this
object is a copy of the original?
-Mark
Mark R. Diggory wrote:
So here is a pruned down verison of my ExtendedActionForward. Martin,
the request object constructor is there as a feature for when the
forward is a redirect, using this constructor builds a redirect which
also includes all the original parameters as well as those that were
added.
-Mark
Mark R. Diggory wrote:
Not only that, I now understand that replace and remove can't be done
based on current RequestDispatcher behavior. This behavior is
slightly odd for RequestDispatcher though. Why if the
"getQueryString()" is completely replaced on forward, is not the
parameter map? Or from the opposit perspective, shouldn't the
getQueryString also contain the original parameters + new parameters
after the forward??? Odd!
-Mark
Mark R. Diggory wrote:
Duh, I see it now, yes your right, Thats a totally stupid mistake in
my code, there are no problems with the forwarding behavior of
Stuts...
Isn't that always the case...;-)
Mark
Martin Cooper wrote:
On Fri, 18 Jun 2004, Mark R. Diggory wrote:
Martin,
I looked into this a little deeper and I'm slightly baffled by
something.
javax.servlet.RequestDispatcher.forward(request,response);
This method pretty much manages the forwarding of requests, and is
what is used by the Servlet API and the JSP API's when doing
forwarding. If I understand correctly, its behavior is such that
when it is gotten from the servlet context using
context.getRequestDispatcher(uri);
if the uri has request parameters, then the Dispatcher manages to
overload the request parameters with those encoded in the uri.
It's not a question of overloading. If there are parameters in the
URI with the same names as parameters in the original request, then
*both* values will show up at the destination. You'll see this if
you try getParameterValues() instead of getParameter().
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]