A 404 in all apps in Tomcat6 until conf/Catalina/localhost dir is deleted
I'm having a strange issue.
A webapp I deployed to Tomcat 6.0.29 will work just fine. As soon as I restart Tomcat however, all my webapps will produce 404s. But, as soon as the tomcat/conf/Catalina/localhost
directory with all the files is deleted and the server is restarted, the web apps will work fine again! Of course, the [webapp].xml
files within conf/Catalina/loc开发者_JS百科alhost
are just copies of context.xml
for each respective web app, and they are not changed in the process of this shutdown/startup cycle, so I'm completely at a loss as to why Tomcat is choking.
I'm not sure why it works for other machines in the office but what did it is removing the docBase
and path
attributes from the context.xml file. Before solving the problem my context.xml used to look something like:
<Context docBase="" path="/myapp">
But, as the documentation suggests, the path
attribute should be empty unless the app lives in a non-standard place. I killed both the docBase and path attributes, and it started working. No clue why it did work before the restart though...
精彩评论