You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Petr Jiricka <pe...@netbeans.com> on 2000/04/05 15:22:26 UTC

Question: role of Tomcat home ?

Hello,

I would like to ask what is the exact role of Tomcat home directory ? I
found the following purposes:

1) default location for server.xml
2) location of the default web.xml
3) location for webapps directory, containing autoloaded web apps

Now, if 
1) I override location of server.xml by the -config switch
2) supply a web.xml for each web application
3) don't want to autoload web apps, but want to specify them all in
server.xml,

then all these reasons disappear. Is there another reason why Tomcat home is
needed ? 

If not, then I don't think that DefaultCMSetter should check that tomcat
home is set, and it should be an optional setting. This would greatly help
in cases when for example I want to run Tomcat as an embedded server.

Thanks in advance for your explanation.
Petr

Re: Question: role of Tomcat home ?

Posted by Costin Manolache <co...@eng.sun.com>.
> I would like to ask what is the exact role of Tomcat home directory ? I
> found the following purposes:
>
> 1) default location for server.xml
> 2) location of the default web.xml
> 3) location for webapps directory, containing autoloaded web apps

Tomcat.home is used for:
1) tomcat jar files ( webserver ,jasper,etc).
2) location for "default" web.xml ( that is merged with your web app web.xml -
you don't need to specify all mappings). That might go away.

Home ( the one you specify in <contextManager> attribute) is used for:
1) webapps
2) a customized web.xml
3) work dir

The meaning of tomcat.home is "the directory where tomcat is installed"
Home is where you run an instance of tomcat ( customized ). You can install
tomcat in
/opt ( as root ) and have every user run it's own instance of tomcat in it's
home.


> If not, then I don't think that DefaultCMSetter should check that tomcat
> home is set, and it should be an optional setting. This would greatly help
> in cases when for example I want to run Tomcat as an embedded server.

We check if tomcat.home is set in order to prevent confiugration mistakes. If
you don't install tomcat then probably it will not run very well, and it will be
hard to track bug reports. We need at least a bit of "known state" - if tomcat
starts then probably CLASSPATH is set corectly and TOMCAT_HOME is ok.

We can move the check in a separate interceptor ( maybe add more checks !) and
then you can disable that by not including the interceptor.

Costin