Thai Thanh Ha wrote:

>   Hi all!I have a problem with my servlet. I want to use
> log4j.properties to configure Log4J. I have put log4j.properties in
> /WEB-INF/classes. I think that Log4J will look for log4j.properties in
> the classpath if I don't use BasicConfigurator.configure() . But Log4J
> couldn't find log4j.properties.  What's wrong? Please help me!

what container are you using? your servlet doesn't actually run like it
would in a free environment.
if you are using tomcat 4 i do have a very rough servlet listener which
loads log4j from a path relative to you context. i can post it to the
list if it's any use.
if you want to roll your own, i started by using a PropertyConfigurator
and the ServletContext to find an absolute path from a location relative
to your web app.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to