At 04:36 PM 3/22/2004 -0800, you wrote:
I am using Log4J in my webapp. I have modified setclasspath.bat so that I
include the path to log4j.properties in my classpath. When I run
startup.bat, all is well and I get logging.
HOWEVER, when I run tomcat from my service manager (the way I wish to run
it), I get no logging, and I get an error message indicating tomcat could
not find my log4j.properties file. I then said 'OK, just put it in my
systems classpath variable. It still did not work. How do I setup Tomcat so
that when I run it as a service, it includes my classpath????

First, I wouldn't use the system classpath for anything dealing with a webapp. Put log4j.jar in WEB-INF/lib and log4j.properties in WEB-INF/classes and you will be fine. Second, the Tomcat service wouldn't see your properties file on the classpath unless you set the classpath at service install time. See service.bat in CATALINA_HOME/bin for info. BTW, make sure Tomcat is sending Stdout to a file in the service. If it isn't, that would explain a lack of Tomcat logging. I don't know what appenders you are using for your webapp, though. If it is a console appender, then having Tomcat log Stdout to a file is kind of important.


Jake



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


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



Reply via email to