struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Gerrard <ch...@gerrard.net>
Subject RE: Auto execution of an action on page display
Date Thu, 30 Jan 2003 00:06:06 GMT
This actually the recommended practice for routing initial contact to the 
application, where the initial file is declared as the <welcome-file> in 
the web.xml file.
The reason is that the <welcome-file> declaration must point to a physical 
file (e.g. initial.jsp) per the Servlet specification and not a Struts 
action, yet the Struts action needs to be invoked upon first contact.
This technique is shown in the struts-blank application included in the 
Struts distribution.

HTH

Chris

At 01:36 PM 1/29/2003, you wrote:
>You can create an initial page that forwards to an Action like this:
>
><%@ taglib uri="/tags/struts-logic" prefix="logic" %>
><logic:redirect forward="KeepHouse.do"/>
>
>KeepHouse.do would then sweep and mop the floor, and return a clean kitchen.
>It might also do the laundry while it's at it.
>
>-Dave
>
>
>
>
>
> > -----Original Message-----
> > From: Howard Roark [mailto:listsubscriber2003@yahoo.com]
> > Sent: Wednesday, January 29, 2003 12: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



---------------------------------------------------------------------
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