10 Years
Discussion Span
Last Post by jwenting

redirect works, forward won't work.

But of course the HTTP session does NOT get shared.
And quite possibly you'll need to make sure you're working with POST requests so and change the request parameters to request attributes.

Remember that nothing except what ends up in the http request gets send across.


Forward won't work given that the requested servlet is looked for in the given ServletContext. sendRedirect doesn't preserve the original request since it's a new request altogether which the client is making -- sendRedirect is basically an indication to the client to request for the given URI.


why don't you sessions then if really want to use send.redirect option otherwise you can use form action method in using html that work fine with jsp

Votes + Comments
giving bad advice that's already told to be bad is not a good idea
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.