posted 18 years ago
When you do a request.sendRedirect(), you are sending the response back to the client, and the client akes another request to fetch the redirect URL. Since this becomes a separate request, and the first request ends once the redirect is sent back to the client, that request object and and hence its attributes are lost.
to overcome this:
1. use the method described in the above post. use RequestDispatcher.forward or RequestDispatcher.include
2. if using redirect is necessary, u will have to send the request attributes manually as hidden form fields and retrieve them in the next servlet/JSP OR put the attributes in the session.