Try this: in struts-config.xml put this
<plug-in className="com....YourPlugin"> </plug-in> And then define YourPlugin as: ... import org.apache.struts.action.PlugIn; public class YourPlugin implements PlugIn { public void destroy() { // holder for things to do } public void init(ActionServlet servlet, ModuleConfig config) throws ServletException { // init your torque } } When you start the server, Torque should be initialized. Let me know if this works. -----Original Message----- From: newtostruts struts [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 2:09 PM To: Struts Users Mailing List Subject: Re: Init methods in Struts Anyone please... newtostruts struts <[EMAIL PROTECTED]> wrote: I want to initialize torque in Struts2. I've got the code to initialize torque and it works fine. The problem is where do I put that code. Is there a place like an init method which is called just once? Thx all for your help. Vinod --------------------------------- Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search. --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]