I agree with Dave. I jumped to the conclusion that this was a onetime cleanup deal that you needed to execute which is why I suggested a servlet in web.xml. I wrote something similar to that to clean up all the supporting xml documents used to support our corporate website everytime the application is rebuilt.
-----Original Message----- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 2:01 PM To: Struts Users Mailing List Subject: RE: Auto execution of an action on page display I don't think this is what you want. You mentioned that this is user specific clean up. I took that to mean you needed to know who accessed this page in order to do the cleanup. The servlet being described below is not a particularly good solution to a problem such as this. What's being described below is a one time clean up operation when you initially start the application, unless this servlet is doing something like starting a thread that's going to be continually checking for a login event (not going into detail on how this would be done) and doing clean up work for that user. The key word being event. There are better ways to handle such an event. One is add a life-cycle listener to your application, that checks session events. This leads to something like, user logged in and is doing their business, while in the background a session event has been fired that is doing clean up work based on data in the user's session. Perhaps you could clarify exactly what it is you need to do? -Dave > -----Original Message----- > From: Howard Roark [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 12:50 PM > To: [EMAIL PROTECTED] > Subject: Re: Auto execution of an action on page display > > > Two follow-on questions to the suggestion: > > 1) Will this initial servlet be able to hand over > control to Struts for all other actions? > > 2) Should the ActionServlet itself be extended to > accomplish these actions, or does a separate > servlet make more sense? TIA. > > HR > > Date: Wed, 29 Jan 2003 13:27:19 -0500 > To: 'Struts Users Mailing List' > <[EMAIL PROTECTED]> > From: "Pani, Gourav" <[EMAIL PROTECTED]> > Subject: RE: Auto execution of an action on page > display > Message-ID: > <[EMAIL PROTECTED]> > > have you considered setting it up as a servlet instead > and do a load on > startup in web.xml? > > -----Original Message----- > From: Howard Roark > [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 1:28 PM > To: [EMAIL PROTECTED] > Subject: Auto execution of an action on page display > > I'm a newbie to Struts, and would like to know if its > possible for Struts to automatically execute an Action > upon the display of the initial page? I would like to > avoid having the user click on something to initiate > certain user-specific house-keeping tasks, if > possible. TIA. > > HR > > P.S. Initiating this action as part of the Login > action > is not possible, since this application does not > require > the use of a login process. > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]