You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Johnson, Garrett" <Jo...@cbsnews.com> on 2002/12/11 18:13:44 UTC
Using response.sendRedirect() with POST
Is there any way to encode parameters into a redirected response WITHOUT
just encoding them into the URL like this:
response.sendRedirect( "/errorpage.jsp?errorcode=12" );
I'd like for it to be transparent to the user, using post, or some other
invisible method like the
request.setAttribute( "errorcode", "12" );
dispatcher.forward( request, response );
method when using a requestDispatcher, but I _do_ want the user to see the
main URL, so I can't use the dispatcher, (I don't think...)
Thanks in advance :)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Using response.sendRedirect() with POST
Posted by "Noel J. Bergman" <no...@devtech.com>.
> Is there any way to encode parameters into a redirected response WITHOUT
> just encoding them into the URL like this:
- cookies
- session attributes
You could encode the data in a cookie, and retrieve it in your target page.
Alternatively, you could put the data into one or more session beans. If
you are not familar with the <jsp:useBean> tag, see the JSP specification
(and HttpSession.set/getAttribute).
--- Noel
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>