Maybe you can
- override setServlet() and do it after the servlet had benn set
- do another servlet that will load at startup and whose only job is to
find path ...
Mike
Patrice Le Cozler a écrit :
Hi,
I want to load a property file at webapp start. Since that property
file is
located in my webapp's directory structure, I want to be able to
determine
its absolute name at runtime.
I tried
"this.getServlet().getServletContext().getRealPath(PROPS_FILE)" but
"getServlet()" returns null when called from an Action constructor.
Why ?
Is there another way to achieve the same result ? I can't use
MessageResources because it depends on the actual httpRequest instance.
Thanks in advance
Patrice
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: [EMAIL PROTECTED]
http://www.cardiweb.com
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]