Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

java - 如何在Tomcat 7中部署War文件(How to deploy a war file in Tomcat 7)

I have copied the sample.war file into the webapps directory of Tomcat, and I can access localhost:8080 .

(我已经将sample.war文件复制到Tomcat的webapps目录中,并且可以访问localhost:8080 。)

Now how will Tomcat deploy it, I mean do I need to open it in browser?

(现在Tomcat将如何部署它,我的意思是我需要在浏览器中打开它吗?)

How can I access the application?

(如何访问该应用程序?)

  ask by translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can access your application from: http://localhost:8080/sample

(您可以从以下位置访问您的应用程序: http://localhost:8080/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 .

(默认情况下,war文件的部署或重新部署是自动进行的-复制/覆盖文件sample.war ,检查您的webapps文件夹中是否有提取的文件夹sample 。)

If it doesn't open properly, check the log files (eg tomcat/logs/catalina.out) for problems with deployment.

(如果无法正常打开,请检查日志文件(例如tomcat / logs / catalina.out)是否存在部署问题。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...