struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Barefoot" <jose...@hereuare.com>
Subject RE: Making Action object as singleton
Date Sat, 22 Jun 2002 21:33:14 GMT
That's okay, everyone's learning around here, myself included.  :)

It's good that you were planning your Action as a Singleton, though, because
that's exactly how Struts treats all Action classes.  Therefore, as you
mentioned, you cannot have class-level member variables (unless they are
static or intended to be shared across sessions) and must pass values
through method calls instead.  Any state variables should go into the
ActionForm associated with the Action instead, or into the HttpSession if
this is not feasible for some reason.

peace,
Joe

> -----Original Message-----
> From: Bhattad, Nilesh [mailto:NBhattad@OneBeacon.com]
> Sent: Friday, June 21, 2002 2:23 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Making Action object as singleton
>
>
> Thanks for your clarification.
> I'm not yet much familiar with Struts framework. And I didn't know that
> Struts take care of making Action object as a Singleton. May be I
> should go
> back and study Struts in detail before implementing it!
>
> Thanks again.
>
> - Nilesh
>
>
>
> -----Original Message-----
> From: Joseph Barefoot [mailto:josephb@hereuare.com]
> Sent: Saturday, June 22, 2002 5:16 PM
> To: Struts Users Mailing List
> Subject: RE: Making Action object as singleton
>
> ?? -- Action objects are always singletons in the Struts
> framework, it only
> creates a single instance of each Action class for delegation....do you
> mean, "What the the advantages/disadvantages to having only a
> single Action
> class in my framework?"
>
> peace,
> Joe
>
> > -----Original Message-----
> > From: Bhattad, Nilesh [mailto:NBhattad@OneBeacon.com]
> > Sent: Friday, June 21, 2002 1:56 PM
> > To: Struts mailing list (struts-user@jakarta.apache.org)
> > Subject: Making Action object as singleton
> >
> >
> > Hello
> >
> > I have an Action object which is common for all JSP pages. It
> doesn't have
> > any object level variable in it. What are all the
> advantages/disadvantages
> > of making Action object as a singleton?
> >
> > Thanks in advance !!
> >
> > - Nilesh
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:struts-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>


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