You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ma...@isrmail.isr.umd.edu on 2003/05/01 17:42:52 UTC

Trigger an action from application startup

I want to trigger an action using its path defined in struts-
config.xml during an application startup. I know I can do the 
same using a servlet and use <load-on-startup>. I want to 
know if it is possible using an action. Any ideas?

Thanks,

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


Re: Trigger an action from application startup

Posted by Dan Tran <da...@hotmail.com>.
According to my understanding, a Strut action always
associates with an user request (http request).  During startup there is no
http request.

Just curious, why you want to do that?

-D
----- Original Message ----- 
From: <ma...@isrmail.isr.umd.edu>
To: <st...@jakarta.apache.org>
Sent: Thursday, May 01, 2003 8:42 AM
Subject: Trigger an action from application startup


>
> I want to trigger an action using its path defined in struts-
> config.xml during an application startup. I know I can do the
> same using a servlet and use <load-on-startup>. I want to
> know if it is possible using an action. Any ideas?
>
> Thanks,
>
> ---------------------------------------------------------------------
> 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


RE: Trigger an action from application startup

Posted by Mark Galbreath <ma...@qat.com>.
Just stick this in your index.jsp (and nothing else):

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<logic:redirect forward="welcome"/>

The forward= action mapping is defined in struts-config and will invoke any
action associated with it.

Mark

-----Original Message-----
From: Jacob Hookom [mailto:hookomjj@uwec.edu] 
Sent: Thursday, May 01, 2003 11:45 AM
To: 'Struts Users Mailing List'
Subject: RE: Trigger an action from application startup


You can do the same kind of thing via a plugin.  It might be best to see if
you can move the executed logic from the action to an object of type Plugin.
See the 1.1 API.

| -----Original Message-----
| From: malla@isrmail.isr.umd.edu [mailto:malla@isrmail.isr.umd.edu]
| Sent: Thursday, May 01, 2003 10:43 AM
| To: struts-user@jakarta.apache.org
| Subject: Trigger an action from application startup
| 
| 
| I want to trigger an action using its path defined in struts- 
| config.xml during an application startup. I know I can do the same 
| using a servlet and use <load-on-startup>. I want to know if it is 
| possible using an action. Any ideas?
| 
| Thanks,
| 
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: struts-user-help@jakarta.apache.org
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 


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


RE: Trigger an action from application startup

Posted by Jacob Hookom <ho...@uwec.edu>.
You can do the same kind of thing via a plugin.  It might be best to see if
you can move the executed logic from the action to an object of type Plugin.
See the 1.1 API.

| -----Original Message-----
| From: malla@isrmail.isr.umd.edu [mailto:malla@isrmail.isr.umd.edu]
| Sent: Thursday, May 01, 2003 10:43 AM
| To: struts-user@jakarta.apache.org
| Subject: Trigger an action from application startup
| 
| 
| I want to trigger an action using its path defined in struts-
| config.xml during an application startup. I know I can do the
| same using a servlet and use <load-on-startup>. I want to
| know if it is possible using an action. Any ideas?
| 
| Thanks,
| 
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: struts-user-help@jakarta.apache.org
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 


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