tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Punte" <ste...@hamsoft.com>
Subject Change Request of ApacheConfig.java
Date Mon, 24 Apr 2000 21:31:46 GMT
Dear Tomcat Developers:

        I humbly request the following change in file
task/ApacheConfig.java:

        In side the most inner loop of execute, instead of lines:

// Static files will be served by Apache
pw.println("Alias " + path + " " + FileUtil.patch(tomcatHome + "/webapps" +
path));
pw.println("<Directory \"" + FileUtil.patch(tomcatHome + "/webapps" + path)
+ "\">");

        Replace with:

// Static files will be served by Apache
if( context.getDocBase().startsWith( "/" ) ) {
  pw.println("Alias " + path + " " + context.getDocBase() );
  pw.println("<Directory \"" + context.getDocBase() + "\">");
}
else {
  pw.println("Alias " + path + " " + FileUtil.patch(tomcatHome + "/webapps"
+ path));
  pw.println("<Directory \"" + FileUtil.patch(tomcatHome + "/webapps" +
path) + "\">");
}


        In this manner, server.sml entries such as:

<Context path="/foo"  docBase="var/foo" >

        Will result in an entry in file tomcat-apache.conf:

Alias  /foo  /usr/local/tomcat/webapps/var/foo

        But an entry with an absolute path such as:

<Context path="/foo"  docBase="/var/foo" >

        Will result in an entry in file tomcat-apache.conf:

Alias  /foo  /var/foo


    WHY?  As a user of tomcat:

1)    I like the auto generation of file tomcat-apache.conf, and
        don't want to constantly be editing it, or keeping
        a "gold" version.

2)    I don't want to keep my application under /usr/local/tomcat.
        This make it awkward to upgrade tomcat and try new
        versions.  Instead.  I desire to have many copies around,
        and to change as few as possible files (i.e. server.xml and
        tomcat.sh or similar) to bring a new version alive.

    This seems logical, at least in my humble opinion.  Or, does
    someone know a way to already to this?

Sincerely:

    STeve Punte
    stevep@technologent.com


Mime
View raw message