It maybe should be noted too that the code originally posted works just fine in Struts, it's just as valid as if Struts wasn't involved

What Rick and Scott are pointing out are what most people would consider more elegant, canonical and "proper" ways. I'm mentioning this because Brian, you said you are doing a conversion, so time may be a factor for you. If so, just leaving it as-is and converting it to JSTL or something later is perfectly viable. Naturally, if time isn't a factor, you might as well do it "right" the first time.

Frank

Rick Reumann wrote:
On 6/16/06, Brian Long <[EMAIL PROTECTED]> wrote:

What's the mechanism in struts to accomplish pulling an object out of
the session and using it in a jsp?

If you are using a more recent app server like Tomcat 5.x+, you can just do ...

in JSP:
<div>My session var ${sessionVar}</div>

El expressions will first look in page scope, then request, then session.

You could also (and this is preferable) to just use JSTL...

<c:out value="${sessionVar}"/>

Or, I guess using <bean:write .. /> is still around also.



--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

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

Reply via email to