struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durham David Cntr 805CSS/SCBE" <David.Durh...@scott.af.mil>
Subject RE: Auto execution of an action on page display
Date Wed, 29 Jan 2003 19:00:43 GMT
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:listsubscriber2003@yahoo.com]
> Sent: Wednesday, January 29, 2003 12:50 PM
> To: struts-user@jakarta.apache.org
> 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'
> <struts-user@jakarta.apache.org>
> From: "Pani, Gourav" <gourav.pani@brightpoint.com>
> Subject: RE: Auto execution of an action on page
> display
> Message-ID: 
> <C3A33EBC212FC740995A72E180415ECD058F0E66@mail-exch01.na.bpww.org>
> 
> 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:listsubscriber2003@yahoo.com]
> Sent: Wednesday, January 29, 2003 1:28 PM
> To: struts-user@jakarta.apache.org
> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message