> From: Barnes, Mark (CORP) [mailto:mark.bar...@adp.com] > Subject: Tomcat 8.0.14 - Using the Wrong Webapp Directory?
> In my server.xml, in my <Host> element, I have name='wapp1_001" and > appBase="". Does the name attribute match that in the <Engine>, or do you have multiple <Host> elements? Regardless, the name attribute is meant to be a DNS name; it seems unlikely that "wapp1_001" is that. Setting appBase to an empty string is rather silly; if it did anything useful at all, it would result in everything in $CATALINA_BASE being treated as a webapp, which is clearly undesirable. I suppose this is yet another misconfiguration that could be explicitly checked for. > In my <Context> element, I have path="/src" and docBase="webapps/src" I'm guessing that your <Context> element is in server.xml, which is pretty much always a bad idea. It should either be in the webapp's META-INF/context.xml file, or in $CATALINA_BASE/conf/[enginename]/[hostname]/[appName].xml (as clearly stated in the documentation). When you do put the <Context> element in a more appropriate location, remove the path and docBase attributes, since they are not used when things are set up correctly. > I would expect Tomcat to use $TOMCAT_HOME/webapps/src for the /src context, > but it's not. The TOMCAT_HOME variable is not used nor recognized by real Tomcat distributions. If you're using some 3rd-party repackaged version, you'll need to consult their documentation. > When I use appBase="/usr/local/tomcat/webapps" things work just fine. Possibly, but you may have a double deployment due to the misconfigured docBase. > Notice that "webapps" is now in both appBase and docBase. Which it shouldn't be. When you correctly place the <Context> element, remove the docBase attribute. > When I use appBase="webapps" things work just fine as well. As expected. > Buth when I use appBase="" it doesn't work. Good; it shouldn't. > The Tomcat 8 configuration docs seem to say that the default for appBase is > the "webapps" > sub-directory of $TOMCAT_HOME, as it always has been. The doc makes no mention of $TOMCAT_HOME. > Did somethning change between Tomcat 6 and Tomcat 8. Lots of things have been tightened up, such that misconfiguration is now more likely to result in explicit errors in the log rather than just doing something unpredictable. Correct your configuration. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org