| From | Sent On | Attachments |
|---|---|---|
| Rutledge, Aaron | Jul 24, 2002 2:04 pm | |
| Mike Jackson | Jul 24, 2002 2:25 pm | |
| Craig R. McClanahan | Jul 24, 2002 2:32 pm | |
| Rutledge, Aaron | Jul 24, 2002 3:01 pm | |
| Mike Jackson | Jul 24, 2002 3:05 pm | |
| Craig R. McClanahan | Jul 24, 2002 3:54 pm |
| Subject: | Multiple HttpServletRequest objects | |
|---|---|---|
| From: | Rutledge, Aaron (ARut...@5prime.com) | |
| Date: | Jul 24, 2002 2:04:30 pm | |
| List: | org.apache.tomcat.users | |
Is it possible to have more than one HttpServletRequest object per session? I am trying to store a request from one form as a session object, process an intermediary form, and then pass the original request to a servlet. I have a couple clunky ways of doing this (having the servlet write a hidden form from the request object and passing this along). I tried to create a session object like...
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { HttpSession session = request.getSession(); session.setAttribute("form_data", request);
...and test the original value with...
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException { HttpSession session = request.getSession(); HttpServletRequest old_form = (HttpServletRequest)session.getAttribute("form_data"); String a_field = old_form.getParameter("textfield");
to see if I get the original field value for the form field called "textfield", but I get a null value. Does anyone have any clever ways of storing a request object and then submitting later in the session?
Best regards to all! Aaron





