Hello all,

i can't understand why some of jsp code below fails :
the output of the code is :
helloreq prints = hi request -- helloses prints = null

in other words, it fails when using session implicit object.
could you explain to me why that happens?
btw, i can't make the newline works (like showed in output), how to
make the 2nd 'hi' go to the new line?

thanks a lot :)

<%
   request.setAttribute("helloreq", "hi request");
   session.setAttribute("helloses", "hi session");

out.println("helloreq prints = " + (String)request.getAttribute("helloreq"));
out.println(" -- ");
out.println("helloses prints = " + (String)request.getAttribute("helloses"));

%>

--
Best regards,
 dion                          mailto:[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

Reply via email to