无法部署 Tomcat6 web 应用程序
我正在尝试在外部服务器上部署新的 Web 应用程序。该服务器正在运行 Tomcat6,并且它已经有一个 Web 应用程序在其后台运行,没有任何问题。 (我转到 URL,它可以工作。)我将 webapp.war 文件部署到 apache*/webapps 目录,当我输入“ant list”来查询管理器时,我得到:
[list] OK - Listed applications for virtual host localhost
[list] /:running:0:ROOT
[list] /manager:running:0:manager
[list] /webapp-x:running:1:webapp-x
[list] /mywebapp:running:0:mywebapp <------ my web app
[list] /docs:running:0:docs
[list] /sample:running:0:sample
[list] /examples:running:0:examples
[list] /host-manager:running:0:host-manager
您可以看到它显示了我的 web应用程序正在运行,但是当我在浏览器中访问 my.url.com/mywebapp 时,出现 404 Not Found 错误。 **但是,当我在浏览器中访问 my.url.com/webapp-x 时,Web 应用程序运行并显示本身没有任何问题。这是为什么呢? webapp-x 有何不同?
I am trying to deploy a new web app on an external server. This server is running Tomcat6 and it already has a web app running under its hood without problem. (I go to the URL and it works.) I deployed my webapp.war file to the apache*/webapps directory, and when I type "ant list" to query the manager, I get:
[list] OK - Listed applications for virtual host localhost
[list] /:running:0:ROOT
[list] /manager:running:0:manager
[list] /webapp-x:running:1:webapp-x
[list] /mywebapp:running:0:mywebapp <------ my web app
[list] /docs:running:0:docs
[list] /sample:running:0:sample
[list] /examples:running:0:examples
[list] /host-manager:running:0:host-manager
You can see that it shows my web application as running, but when I go to my.url.com/mywebapp in a browser, I get a 404 Not Found Error. **However, when I go to my.url.com/webapp-x in a browser, the web application runs and displays itself without any problem. Why is this? What could be different about webapp-x?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查日志以确保 Web 应用程序在启动时没有抛出任何异常,这会阻止上下文出现。
Check the logs to make sure the webapp didn't throw any exceptions on startup, which prevents the context from coming up.
尝试停止它并删除 warfile 和 mywebapp 目录,然后重新启动服务器并重新部署它通常可以解决我的问题
try stopping it and delete the warfile and the mywebapp directory then restart the server and redeploy it usually fixes the problem for me