On Tue, 24 Jun 2003 00:01, Jim Lynch wrote:
> I recently switch from doing "install", "remove" deployments via a build
> directory to "deploy", "undeploy" via a war file. Unfortuantely my
> logging has stopped working. I've traced it to the following statement:
>
> PropertyConfigurator.configure(getServletContext().getRealPath("/")+"/WEB-I
>NF/classes/log4j.properties");
From a previous post (I'd include a link but I searched my local mailbox as
the archives are notoriously hard to search):
Properties logProp = new Properties();
logProp.load(ActionServlet.getServletContext().getResourceAsStream("/WEB-INF/classes/log4j.properties"));
PropertyConfigurator.configure(logProp);
So you want getResourceAsStream instead seeing how the file is contained
within a WAR file. :)
Regards,
--
Jason Bainbridge
http://jblinux.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]