Larry thanks for the reply.
I'm in Struts2 mode and I don't see a PlugIn interface anywhere.
Also, I read this on apache site ' Struts 1 provides a plugin class that
provides listener-like capabilities. The Struts 2 plugins are like Eclipse or
FireFox plugins, and not at all like Struts 1 "plugins". '
Any other alternatives ?
"Zhang, Larry (L.)" <[EMAIL PROTECTED]> wrote:
Try this:
in struts-config.xml put this
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 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]
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.