struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <>
Subject Re: Is Action Instantiated Once?
Date Fri, 04 Jul 2003 01:38:08 GMT
--- Billy Ng <> wrote:
> Hi folks,
> I have a address book page that has the previous and next buttons.  I
> notice if 2 different users try to access the address books, last one
> who clicks on the button always get what it should display.  This sounds
> very like they are both are using the same Action.
> The address book action extends a ActionBase that extends Strut's
> Action.  Would anybody tell me if Strut will instantiates a new acton
> everytime it is called?  

Actions are Singletons.  They are only instantiated once and reused for
the life of the app.  This is why your Actions must be thread safe and not
use instance variables to hold state.


> Did I miss something on the configuration to
> make it thread dependent?
> Thanks!
> Billy Ng

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

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

View raw message