You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Karl <ka...@webartjapan.com> on 2003/03/13 07:26:09 UTC

One-time initializing in struts

Is there a way to do one-time initialization in struts without having to put 
check logicn in every action?

I want to use turbine as my persistance back-end but I need to call 
Torque.init("Torque.properties"); somewhere.


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


RE: One-time initializing in struts

Posted by Scott Barr <sc...@exergonic.com.au>.
Hi Karl

I use a Servlet to do app initialisation. 
Add the Servlet to web.xml, and set the load-on-startup parameter. Then
you put the initialisation code in the Servlet, and you're away.

Scott Barr
www.exergonic.com.au


On Thu, 2003-03-13 at 17:05, Andrew Hill wrote:
> Struts PlugIn might be the best option for that. Check the docs. Dont think
> its supported in 1.0 though, just 1.1. (With each 1.1.x version having a
> different interface!)
> 
> -----Original Message-----
> From: Karl [mailto:karl@webartjapan.com]
> Sent: Thursday, 13 March 2003 14:26
> To: Struts Users Mailing List
> Subject: One-time initializing in struts
> 
> 
> Is there a way to do one-time initialization in struts without having to put
> check logicn in every action?
> 
> I want to use turbine as my persistance back-end but I need to call
> Torque.init("Torque.properties"); somewhere.
> 
> 
> ---------------------------------------------------------------------
> 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


RE: One-time initializing in struts

Posted by Andrew Hill <an...@gridnode.com>.
Struts PlugIn might be the best option for that. Check the docs. Dont think
its supported in 1.0 though, just 1.1. (With each 1.1.x version having a
different interface!)

-----Original Message-----
From: Karl [mailto:karl@webartjapan.com]
Sent: Thursday, 13 March 2003 14:26
To: Struts Users Mailing List
Subject: One-time initializing in struts


Is there a way to do one-time initialization in struts without having to put
check logicn in every action?

I want to use turbine as my persistance back-end but I need to call
Torque.init("Torque.properties"); somewhere.


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