Good Morning Wang the answer depends on the value of your autodeploy ths is straight from the doc http://tomcat.apache.org/tomcat-5.5-doc/config/host.html
appBase "The Application Base directory for this virtual host. This is the pathname of a directory that may contain web applications to be deployed on this virtual host. You may specify an absolute pathname for this directory, or a pathname that is relative to the $CATALINA_BASE directory. See Automatic Application Deployment for more information on automatic recognition and deployment of web applications to be deployed automatically." In Auto-deploy scenarios (either at startup or when changes are made to configurations) docBase "Any XML file in the $CATALINA_HOME/conf/[engine_name]/[host_name] directory is assumed to contain a Context element (and its associated subelements) for a single web application. The docBase attribute of this <Context> element will typically be the absolute pathname to a web application directory, or the absolute pathname of a web application archive (WAR) file (which will not be expanded). " caveat: "When using automatic deployment, the docBase defined by an XML Context file should be outside of the appBase directory. If this is not the case difficulties may be experienced deploying the web application or the application may be deployed twice." (so under Autodeploy=true scenario docBase != appBase) Anyone else? M- --------------------------------------------------------------------------- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --------------------------------------------------------------------------- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. ----- Original Message ----- From: "Wang Penghui" <[EMAIL PROTECTED]> To: <users@tomcat.apache.org> Sent: Wednesday, December 13, 2006 9:10 PM Subject: appBase & docBase in <Host> element in server.xml > Hello, list, > > I am a little mess up with the configuration of tomcat 5.5.20 now. > > I use the follow configuration to setting up two Virtual Host in server.xml > > <Host className="org.apache.catalina.core.StandardHost" > appBase="/home/test/wwwroot" autoDeploy="true" > configClass="org.apache.catalina.startup.ContextConfig" > contextClass="org.apache.catalina.core.StandardContext" debug="0" > deployXML="true" > errorReportValveClass="org.apache.catalina.valves.ErrorReportValve" > liveDeploy="true" > mapperClass="org.apache.catalina.core.StandardHostMapper" > name="test.jsp-test.bizcn.com" unpackWARs="true"> > <Context path="" docBase="" reloadable="true" debug="0"/> > </Host> > <Host className="org.apache.catalina.core.StandardHost" > appBase="/home/test2/wwwroot" autoDeploy="true" > configClass="org.apache.catalina.startup.ContextConfig" > contextClass="org.apache.catalina.core.StandardContext" debug="0" > deployXML="true" > errorReportValveClass="org.apache.catalina.valves.ErrorReportValve" > liveDeploy="true" > mapperClass="org.apache.catalina.core.StandardHostMapper" > name="test2.jsp-test.bizcn.com" unpackWARs="true"> > <Context path="" docBase="" reloadable="true" debug="0"/> > </Host> > > And both of them work correctly. > > I have digged some articles which related to the virtual host on tomcat > and found something unclear about the appbase and docbase. > > Here are some examples, could you tell me which one is correct. > > 1. appbase = "/home/test/wwwroot" docbase = "". > and the default path of docbase should be appbase/ROOT > 2. appbase = "/home/test/wwwroot" docbase = "/home/test/wwwroot/ROOT" > the same as the above configuration > 3. appbase = "/home/test/wwwroot" docbase = "/home/test/wwwroot" > is it correct or workable? I have not tested it yet. > 4. appbase = "webapps" docbase = "/home/test/wwwroot" > is it correct or workable? > > Thanks very much. > > Wang. > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >