From: "Troy Bull" <[EMAIL PROTECTED]>
I have an action that puts a string in to session named variable. Then returns success which loads a jsp page. On that page I have the following 2 lines. I thought it would print out the message 2 times but it does not it only prints it once. The second line is the one that prints it out.

   <c:out value="${session.variable}"/>
    <%= session.getAttribute("variable") %>

So the c:out tag isn't working, any ideas why that would be?

Try just:
  <c:out value="${variable}"/>

It will check page, request, session, and application scope looking for the object under that key.

As Ronald pointed out, if you need to get something out of session scope explicitly, it's ${sessionScope.variable}. Alternately, since it's a Map, ${sessionScope['variable']} will also work, and comes in handy if the key happens to have periods in it.

--
Wendy Smoak

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to