Hi,
        
> The ActionServlet has a reference to the servlet context which may be
> retrieved using:
> servlet.getServletContext()
> 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.
> 

ok, got it. and i have done it. 
but now the problem is retrieving my component from the context.
in my Action class there are no references to ActionServlet, and thus
i cannot get the ServletContext from anywhere...

any help?

regards
        marco



> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, 6 June 2003 14:18
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> 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 easil
> hook into the ActionServlet lifecycle.'
> and
> '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
>       marco
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: ext David Graham [mailto:[EMAIL PROTECTED]
> > Sent: 05 June, 2003 17:28
> > To: [EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
> > >For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > >
> >
> > _________________________________________________________________
> > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > http://join.msn.com/?page=features/virus
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to