struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edgar Dollin <Ed...@BLUE-MOOSE.NET>
Subject RE: Is Action Instantiated Once?
Date Fri, 04 Jul 2003 14:38:31 GMT
The way to handle this kind of stuff is in the ActionForm.  If you have
standard actions, you can subclass ActionForm and have your forms subclass
this new form.

Edgar

> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org] 
> Sent: Thursday, July 03, 2003 8:42 PM
> To: 'Struts Users Mailing List'; 'Billy Ng'
> Subject: Re: Is Action Instantiated Once?
> 
> 
> 
> 
> On Thu, 3 Jul 2003, Billy Ng wrote:
> 
> > Date: Thu, 3 Jul 2003 18:21:53 -0700
> > From: Billy Ng <kwokng@earthlink.net>
> > Reply-To: Struts Users Mailing List 
> <struts-user@jakarta.apache.org>,
> >      Billy Ng <evebill8@hotmail.com>
> > To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> > Subject: Is Action Instantiated Once?
> >
> > 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?
> 
> No ... one instance only (just like servlets).
> 
> >  Did I miss something on the configuration to
> > make it thread dependent?
> >
> 
> You're probably using instance variables in the Action class 
> to store things relevant only to a particular request.  If 
> so, use local variables or request/session scope attributes instead.
> 
> > Thanks!
> >
> > Billy Ng
> 
> Craig
> 
> 

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


Mime
View raw message