struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Woon <morph...@SMI.Stanford.EDU>
Subject Re: Quick question about iterators & beans on a page
Date Sat, 16 Feb 2002 12:11:56 GMT
Adam Hardy wrote:

> (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?

Yup.  But you can also clean it out of the session yourself.

> (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?

Depends on what you mean.  If it's a read-only collection, then sure, it's "thread safe".
 But if you expect that list to change, then no, it's not thread-safe, because multiple
requests from the same user would be able to access the collection.


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

View raw message