Hi,
PropertyConfigurator.configure(getServletContext().getResource("/WEB-INF
/log4j.properties")).  The getResource call returns a readable URL.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Mark Himsley [mailto:[EMAIL PROTECTED]
>Sent: Friday, April 16, 2004 12:43 PM
>To: [EMAIL PROTECTED]
>Subject: getRealPath() and PropertyConfigurator.configure
>
>Hi,
>
>I've googled and looked in the mail archives but I've failed to find
>
>If PropertyConfigurator.configure() accepts a String, a URL or a
Properties
>object
>
>and we are using log4j in a servlet
>
>and it is unwise to use getServletContext().getRealPath("/") in a
servlet
>because it might be in an unexpanded WAR and we are making our
application
>compatible with that
>
>then in what way should we configure our logger?
>
>All the examples I've seen (including the one in the documentation) use
a
>String containing a filename built from using getRealPath.
>
>Thanks in advance.
>
>--
>Mark Himsley
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to