Hi John,
Have a look at the JSDK API, then check what kind of value the method
javax.servlet.http.HttpSession.html#getValue(javax.servlet.http.String)
returns and lastly check to see if you can use the "+" operator to
concatenate a String with what this method returns.
Regards,
Dan
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------
D'Esposito John wrote:
>
> I have a simple jsp that was invoked via a "forward" in a RequestDispatcher
> object from a servlet. The forward works perfectly well and I am able to
> instantiate beans via the Scope=request. In my servlet I set the session
> object with a parameter. I assume that I can obtain a handle to the
> session object in my jsp and retrieve the value that was originally set in
> the servlet.
>
> In the servlet:
>
> HttpSesssion session = req.getSession(true);
> String itemColor= null;
> itemColor = "blue";
> session.putValue("itemColor", itemColor);
>
> In the JSP:
>
> <%
> out.println("Color = " + session.getValue("itemColor"));
> %>
>
> I am getting a JSP error message on the jsp line mentioned above. What am
> I doing wrong? How can I get a handle parameters on the session object?
>
> Thanks,
>
> John D'Esposito
===========================================================================
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