I met the same problem. To read your query string in included or forwarded servlet, 
you have to use the call:

String query = request.getAttribute("javax.servlet.include.query_string");

Regards,
Dmitry R., [EMAIL PROTECTED]
Chief Architect, MetricStream.COM
Santa Clara, CA






-----Original Message-----
From:    paul marshal [EMAIL PROTECTED]
Sent:    Wed, 21 Feb 2001 16:48:26 +0100
To:      [EMAIL PROTECTED]
Subject: Re: RequestDispatcher.forward() problem


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]




___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to