Use the JSTL.  It would be as simple as this:

  <c:out value="${SESSION_USER.firstName}"/>

Or if you wanted to make sure you got it from session scope:

  <c:out value="${sessionScope.SESSION_USER.firstName}"/>

> -----Original Message-----
> From: Sloan Seaman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 9:16 AM
> To: [EMAIL PROTECTED]
> Subject: Session
> 
> What is the best way to get an object out of the session?
> 
> The session taglib only has the <sess:attribute> tag which will print
it.
> 
> I want to do more along the lines of:
> <sess:attribute name="SESSION_USER" id="user" scope="session">
>     <jsp:getProperty name="user" property="firstName"/>
> </sess:attribute>
> 
> I have written my own tag to do this but I ma curious if there are any
> apache tags to do this and if not, why?
> 
> You can store more than strings in the session attributes...
> 
> --
> Sloan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to