Hi!
Use session 's putValue("key","value);
then in JSP call getValue("key");
It will definetly work
bye
At 09:19 AM 8/24/00 -0600, you wrote:
>I have a servlet that accepts values from a jsp and processes them, then
>passes them back to another jsp through the session object. However, the jsp
>that receives the values from the servlet displays those values as "null".
>Now, if I have the servlet generate the output, the values display as
>expected. Here's the code in the servlet:
>
>HttpSession session = req.getSession(true);
>...code that processes values...
>session.setAttribute("id", id_response);
>resp.sendRedirect("http://localhost/results.jsp");
>
>
>Here's the code in results.jsp that doesn't seem to work:
>
><html><head><title></title></head>
><body>
><%
> String v_id = (String) session.getAttribute("id");
>%>
>Here is the value <%= v_id %>
></body></html>
>
>Now, as I explained, if I comment out the redirect statement and add this
>code to the servlet (assuming, of course, I get the PrintWriter and so
>forth), the values display as expected:
>
>session.setAttribute("id", id_response);
>out.println("Here is the value " + session.getAttribute("id"));
>out.flush();
>
>Can anyone help me understand this behaviour?
>
>Thanks in advance,
>[EMAIL PROTECTED]
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
Sanjeev Kumar Sharma
Velocient Technologies Ltd.
F-2/B-1, Mohan Co-operative Industrial Estate,
New Delhi-110044.
Off:- # 91-6945226/7/8-120
Res:- # 91-4518858
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets