If you're using 1.1, you can setup a plugin for it. If you're using a 2.3 
container and don't need to support 2.2, you can setup a event listener on 
the servlet context creation for the application. Or you could just put 
initialize it in the init() method of the ActionServlet.

Chuck


At 06:39 PM 4/3/2002 -0800, you wrote:
>HI,
>
>I'm using struts & torque together. I put some initialize code in one of 
>my class as a static code. But these code is not executed until class 
>DataModel is lodaded. So, if I call any function of Torque, it will report 
>that "Torque is not initialized".
>
>Where can I put some global initialize code for the application ? Thanks.
>
>Annie
>
>public class DataModel {
>
>   static {
>       try{
>           Torque.init("piso.properties");
>       }
>       catch (Exception e)
>       {
>           e.printStackTrace();
>       }
>   }


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to