2003. janu�r 22. 12:59 d�tummal Softwareentwicklung Hauschel ezt �rtad:
> But my log4j.properties are a log4j.xml file.
> That doesn't work in classpath ;-(
> In addition there are mor configurations i need for the whole applikation.
I can't see why can you not pick up the init-params in your serlvet's init()
method. It's so easy.
For each servlet I wrote I provide the config parameter which is an xml file.
This xml is parsed with Digester.
This is how I do it, and do not be surprised if you see some coincidence with
the ActionServlet's init() method...
public void init() throws ServletException {
String value;
try {
LOG.debug("start init");
// Initialize the context-relative path to our configuration
resources
value = getServletConfig().getInitParameter("config");
if (value != null)
config = value;
// Acquire an input stream to our configuration resource
InputStream input =
getServletContext().getResourceAsStream(config);
if (input == null)
throw new UnavailableException
("config file '" + config + "' is missing");
Digester digester = null;
digester = initDigester();
...
Hth,
Tib
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>