On 04/05/2010 18:59, Joe Hansen wrote: > Many Thanks for the link Chuck! Here's what I did. > > 1. Created a directory named c:\Tomcat\abc\ROOT. > 2. Moved the previous contents of c:\Tomcat\webapps\abc to > c:\Tomcat\abc\ROOT directory. > 3. Created c:\Tomcat\abc\ROOT\META-INF\context.xml. Here's that file. > <?xml version="1.0" encoding="UTF-8"?> > <Context> > <ResourceLink global="jdbc/ProgressDatabase" > name="jdbc/ProgressDatabase" type="javax.sql.DataSource" /> > </Context> > 4. Changed c:\Tomcat\conf\server.xml to > <Host name="localhost" appBase="webapps" unpackWARs="true" > autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> > </Host > > <Host name="abc.local" appBase="abc" unpackWARs="true" > autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> > </Host> > > End Result is: > 1. Spring Context loader is loaded only once (Great!). > 2. But the web application logging is working wierdly.The log entries > are written to c:\Tomcat\logs\xyz.log (i.e. the xyz web application's > log) instead of writing to c:\Tomcat\logs\abc.log. . > > Here's the c:\Tomcat\abc\ROOT\WEB-INF\classes\log4j.properties file. > > log4j.rootLogger=INFO, A2 > log4j.appender.A2=org.apache.log4j.RollingFileAppender > log4j.appender.A2.layout=org.apache.log4j.PatternLayout > log4j.appender.A2.layout.ConversionPattern=%d{yyyy MMM dd / HH:mm:ss} > %-5p - [%c] : %m %n > log4j.appender.A2.File=c:/Tomcat6/logs/trestlewood.log > log4j.appender.A2.MaxFileSize=100KB > log4j.appender.A2.MaxBackupIndex=4
And what about the xyz one? p > Please advise! > > Thank you! > Joe > > On Tue, May 4, 2010 at 11:30 AM, Caldarale, Charles R > <chuck.caldar...@unisys.com> wrote: >>> From: Joe Hansen [mailto:joe.hansen...@gmail.com] >>> Subject: RE: Log4j logging doesn't work when a web application is moved >>> outside Tomcat/webapps directory >> >>> Looks like I have some reading to do! Will post back after >>> I read some Tomcat documentation. >> >> Start here: >> >> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html >> >> - Chuck >> >> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY >> MATERIAL and is thus for use only by the intended recipient. If you received >> this in error, please contact the sender and delete the e-mail and its >> attachments from all computers. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
signature.asc
Description: OpenPGP digital signature