struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <>
Subject RE: question about struts
Date Fri, 06 Jun 2003 06:23:56 GMT
The ActionServlet has a reference to the servlet context which may be
retrieved using:
Using the servlet reference passed to your plugins init() method.

Your plugin would initialise those objects you want stored in the servlet
context, and then store them there. The plugin itself doesnt need to be
stored as its job is just initialisation.

-----Original Message-----
From: []
Sent: Friday, 6 June 2003 14:18
Subject: RE: question about struts

Hi David,
	thanx 4 the suggestion...actually i was thinking on either use a
plugin or extending action servlete.
but i m left out with one issue: where actually do i have to write the code
for storing the plugin in the servlet context?
struts docs mention
'The PlugIn interface extends Action and so that applications can easily
hook into the ActionServlet lifecycle.'
'At runtime, any resource setup by init would be accessed by Actions or
business tier classes'

but how?

all the searchs that i have done shows how to configure plugins,...not how
to use..

can anyone help?

thanx and regards

> -----Original Message-----
> From: ext David Graham []
> Sent: 05 June, 2003 17:28
> To:
> Subject: Re: question about struts
> You can use a Struts PlugIn to initialize your components and
> store them in
> the ServletContext.
> David
> >hi all,
> >	i have been working with JSP model 2 for few years, and
> now i want to move
> >to struts.
> >i am starting to get acquainted with it, and i need help to
> face this
> >situation.
> >in my mvc, i am using 2 components, one to connect to R3 and
> the other for
> >connecting to DB.
> >the lifecycle of those components is the same as my servlet,
> since those
> >components are not
> >user/session/request specific.
> >
> >in reading docs about struts, i could not figure out where
> to put those
> >components in the
> >struts framework. of course, i can put them in
> ActionServlet, but this will
> >require me to modify the
> >code of the ActionServlet.
> >
> >is there any other way to do that other than modifying the code of
> >ActionServlet?
> >
> >hope someone can help...
> >
> >thanx in advance and regards
> >	marco
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> >For additional commands, e-mail:
> >
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

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

View raw message