在tomcat服务器中部署war文件 [英] deploy war file in tomcat server

查看:449
本文介绍了在tomcat服务器中部署war文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将sample.war文件复制到tomcat的webapps目录中。

I have copied the sample.war file in webapps directory of tomcat.

我可以访问localhost:8080。

I can acess localhost:8080.

默认情况下自动部署战争-i已经检查了我的webapps文件夹中的解压缩文件夹sample

deploying of wars is automatic by default -i have checked my webapps folder for an extracted folder "sample"

但是它没有被提取出来。为什么是war文件是没有提取。请给我解决方案。

but it is not extracted.why the war file is doesn't extracted.please give me solution for this.

推荐答案

webapps删除该war文件/ 目录。然后在Web浏览器中打开链接 http:// localhost:8080 / 。单击 Tomcat Manager ,然后输入用户名和密码。在下一页中,您可以看到一个名为 要部署的WAR文件 的选项。从那里选择您的war文件,然后单击 deploy 按钮。

Delete that war file from webapps/ directory. Then open link http://localhost:8080/ in your web browser. Click Tomcat Manager then enter user name and password. In next page you can see one option called "WAR file to deploy". Select your war file from there and click "deploy" button.

如果要在复制时进行自动部署文件到 webapp / 目录。然后确保 server.xml 文件包含以下值:

If you want auto deployment when you copy files to webapp/ directory. Then make sure that you server.xml file contains the following values:

autoDeploy="true"
unpackWARs="true"

只需在您的搜索中搜索这些值 server.xml 文件和编辑值如上所示

Just search these values in your server.xml file and edit values as shown above

有关详细信息,请参阅从本地路径部署新应用程序

For more info see Deploy A New Application from a Local Path.

这篇关于在tomcat服务器中部署war文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆