Pass HTTP Request object between JSP Pages?
I have a servlet which returns a bunch of html code to a jsp page.
I have since needed to modify the receiving page so that it uses frames.
I'd like to know how I can pass the Request object from the main page (Frameset) to the final page.
For example:
The servlet does this after creating the message string <msg>:
Code:
request.setAttribute("wmessage",msg);
RequestDispatcher dispatcher=getServletContext().getRequestDispatcher("results.jsp");
dispatcher.forward(request, response);
My current "results" page uses this code to get the
request:
Code:
<table border="0" cellspacing="2" cellpadding="3" align="left" width="100%">
<%=request.getAttribute("wmessage")%>
</table>
The results.jsp page is now within a frame, and the Frameset Page is called by the servlet.
I tried this from the Frameset page:
Code:
<frame src="results.jsp?results=<%=request%>">
And this on the Results.jsp page:
Code:
<table border="0" cellspacing="2" cellpadding="3" align="left" width="100%">
<%=request.getAttribute("wmessage")%>
</table>
All I ever get is 'null'.
How can I take the original HTTP Request and send it to the frame page, then retrieve the info I need from the request?
Thanks.