The differences are not much - both are probably equally usuable in this case.
The advantages to using the struts plugin are that it gives you access to struts configuration information, and that you can control the order in which your plugins are initialised from struts-config. -----Original Message----- From: FrenzyGNX [mailto:[EMAIL PROTECTED] Sent: Friday, 6 June 2003 14:52 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: question about struts I use an initialization servlet to establish db and EJB server connections. How does it compare to PlugIn approach? Thanks. --- Andrew Hill <[EMAIL PROTECTED]> wrote: > 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. > > > -----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 easily > 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] > __________________________________________________ Do You Yahoo!? Send free SMS from your PC! http://sg.sms.yahoo.com --------------------------------------------------------------------- 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]