Bug 32603 - Tomcat documentation wrong
Tomcat documentation wrong
Product: Tomcat 5
Classification: Unclassified
Component: Unknown
All All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2004-12-09 11:45 UTC by N. Flucke
Modified: 2004-12-09 05:47 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description N. Flucke 2004-12-09 11:45:42 UTC
I found out that the appBase-attribute (server.xml) is not relative to
$CATALINA_HOME. It's relative to $CATALINA_BASE unless it's specified an
absolute pathname.
In the documentation
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html you write for
the appBase-attribute: "...You may specify an absolute pathname for this
directory, or a pathname that is relative to the $CATALINA_HOME directory..."
But in the sourcecode of HostConfig.java I found this:    
  protected File appBase() {
        if (appBase != null) {
            return appBase;
        File file = new File(host.getAppBase());
        if (!file.isAbsolute())
            file = new File(System.getProperty("catalina.base"),
        try {
            appBase = file.getCanonicalFile();
        } catch (IOException e) {
            appBase = file;
        return (appBase);

It should be correct in the documentation, because it's bit confusing.
I tested it with Tomcat 5.0.27 but I check the actual code in CVS, it's the same.
Comment 1 Yoav Shapira 2004-12-09 14:47:05 UTC
Fixed for 5.0.31 and 5.5.6.  Thanks for pointing this out.