Andrew Kerr wrote:
>
> 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
Hi !
I can't answer your exact question.
But for many purposes - other than reusing an existing servlet class
that you forward to -
request.setAttribute("name" , valueObject) ;
RequestDispatcher dest = context.getRequestDispatcher("...");
dest.forward(request,response);
will do.
--
Paul Marshall
[EMAIL PROTECTED]
089/26019-609
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]