开发者

A 404 in all apps in Tomcat6 until conf/Catalina/localhost dir is deleted

开发者 https://www.devze.com 2023-03-06 00:45 出处:网络
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

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消