struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <adam_ha...@altavista.com>
Subject Re: Quick question about iterators & beans on a page
Date Sat, 16 Feb 2002 12:02:12 GMT
On Fri, 15 February 2002, jamesblakey@firstdirect.com 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?

thanks
Adam


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message