Re: read init parameters in action

2005-07-10 Thread Borislav Sabev
Sure, here it is: 1. this snippet you have to add to your stuts-config.xml className="com.mycompany.myproduct.servlet.InitPlugin"> 2. this is the plugin-code: public class InitPlugin implements org.apache.struts.action.PlugIn { public void destroy() { try { Hibernate

Re: read init parameters in action

2005-07-09 Thread Tony Smith
Thanks. Could you show me how to write such plug-in? --- Borislav Sabev <[EMAIL PROTECTED]> wrote: > I think there are 2 cases: > 1. you need a param that is available to the Servlet > and is not uniquie > to any particular Action > for eample in my application users can uppload > images,

Re: read init parameters in action

2005-07-08 Thread Borislav Sabev
I think there are 2 cases: 1. you need a param that is available to the Servlet and is not uniquie to any particular Action for eample in my application users can uppload images, so after the upload I store them in a subfolder in the application. here is how I do it: a. this s

RE: read init parameters in action

2005-07-08 Thread Frank W. Zammetti
t; Sent: Friday, July 08, 2005 10:30 AM > To: Struts Users Mailing List > Subject: read init parameters in action > > > For traditional servlets, you can set init parameters > in the web.xml and read it in a static init method in > servlet class. Can I have similar things for a

RE: read init parameters in action

2005-07-08 Thread Abdullah Jibaly
Why not put it them in your properties file? -Original Message- From: Tony Smith [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 10:30 AM To: Struts Users Mailing List Subject: read init parameters in action For traditional servlets, you can set init parameters in the web.xml and

read init parameters in action

2005-07-08 Thread Tony Smith
For traditional servlets, you can set init parameters in the web.xml and read it in a static init method in servlet class. Can I have similar things for action? If I need some of these init parameter for my web app, what is the best way to do it with struts? Thansk,