struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: Quick question about iterators & beans on a page
Date Sat, 16 Feb 2002 12:02:12 GMT
On Fri, 15 February 2002, wrote:
> Adam, I've just cracked this myself.
> In your Action, set your collection to a session attribute:
> Vector someVec = valueBean.getSomeData();
> session.setAttribute("itData", someVec);
> Then in your JSP:
> <logic:iterate name="itData" id="list" scope="session">
> ...
> </logic:iterate>

I've still got 2 questions though:

(1) if you put it in the request, then it will get cleaned up by the server at the end of
the page automatically, but in the session it will stay until the session dies, right?

(2) is it thread-safe? Guess it must be, but why? Does it all stay in one thread of the main
struts controller servlet, and out of reach of any other threads?


Find the best deals on the web at AltaVista Shopping!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message