tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Logging - including host name in log file?
Date Fri, 02 Dec 2011 15:45:44 GMT
Hash: SHA1


On 12/1/11 11:34 PM, Jerry Malcolm wrote:
> Where should the properties file be located?  All of the docs say
> it should be in /common/classes.  But in my install, it's in
> /conf.

Something conspicuously missing in your original post was what version
of Tomcat you are using. If you are reading docs that mention
/common/classes, I suspect you're working with something less than
Tomcat 6.x. If that's true, are you able to upgrade? Tomcat 6 and 7
both have significant improvements and should be backward-compatible.

You can work with an older version of Tomcat, but 5.0 EOL'd a long
time ago and I think 5.5's days are numbered. Tomcat 7 is where the
real action is these days.

> At the risk of opening another bag of worms.... in your example,
> you said: (But, of course, you don't have that because you
> shouldn't put <Context>s in server.xml, but I have it here for the
> sake of brevity).  Ok, I DO have context statements in my
> server.xml. I'm obviously not following best practices.... but it's
> worked fine for years. Can you point me to documentation that
> explains the negatives of doing it the way I'm doing it vs. the
> best practices way, and what the best practices way to do that is?

If you are using Tomcat 5.5 or later (which I hope you are), the best
thing to do is to use a file in your webapp's META-INF/context.xml --
that should contain your <Context> element and should contain neither
a "docBase" (because the file was loaded out of the webapp's docBase,
so Tomcat already knows where it is) nor a "path" (because the name of
the WAR file or exploded-WAR-structure already dictates the context path).

If you have an odd configuration where you want your WAR file
somewhere other than the webapps/ auto-deploy directory for your host,
then you can use a file in Tomcat's
conf/[Service]/[Host]/[webappname].xml, and you'll have to specify the
docBase attribute and point it at your webapp's WAR file (or

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message