问题描述
我已经把sample.war
文件复制到Tomcat的webapps
目录下,可以访问localhost:8080
.
I have copied the sample.war
file into the webapps
directory of Tomcat, and I can access localhost:8080
.
现在Tomcat将如何部署它,我的意思是我需要在浏览器中打开它吗?如何访问应用程序?
Now how will Tomcat deploy it, I mean do I need to open it in browser? How can I access the application?
推荐答案
您可以从以下位置访问您的应用程序:http://localhost:8080/sample
You can access your application from: http://localhost:8080/sample
默认情况下,war 文件的部署或重新部署是自动的 - 在复制/覆盖文件 sample.war
后,检查您的 webapps
文件夹中是否有解压缩的文件夹 sample
.
Deploying or redeploying of war files is automatic by default - after copying/overwriting the file sample.war
, check your webapps
folder for an extracted folder sample
.
如果无法正常打开,请检查日志文件(例如 tomcat/logs/catalina.out)是否存在部署问题.
If it doesn't open properly, check the log files (e.g. tomcat/logs/catalina.out) for problems with deployment.
这篇关于如何在Tomcat 7中部署war文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!