Can i put Request object in the Session object like this. session.setAttribute("page1", request); after pass 2 page i want to get page1 again i use HttpServletRequest page1 = (HttpServletRequest) session.getAttribute("page1"); Is it work ??
In a round-about way, Andres is saying that no, you can't do that. A request object is only valid until you have sent your response, and that's it. It certainly wouldn't be a good idea to try to hold onto it and do anything with it during rubsequent requests. Dave
posted 14 years ago
One alternative you might want to consider is to use the RequestDispatcher.forward(reqest, response) method from the ServletContext(application). You can wrap your page 2 resource in a RequestDispather object and then forward the request object to page 2. One suggestion. craig.