有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java是部署到tomcat进行测试的最简单方法,我应该保存哪个文件夹。战争档案?

我目前可以通过执行以下操作部署到tomcat:

  1. 拯救我的生命。war文件位于/var/lib/tomcat6/webapps/文件夹中,我删除了/ROOT文件夹

然后修改服务器。xml中添加以下内容:

   <Context docBase="mywar.war" path="" />

但由于某些原因,当我停止tomcat时,我不断遇到缓存问题,请删除。war文件和分解的文件夹,然后放置一个新文件夹。webapps/中的war文件,它似乎没有使用更新的代码库

所以我希望有人能告诉我我做错了什么,或者是一个更好的部署方式


共 (3) 个答案

  1. # 1 楼答案

    But for some reason I keep getting caching issues when I stop tomcat, delete the .war file and the exploded folder, and then drop a new .war file in the webapps/ , it seems not use the updated codebase.

    还可以尝试清除tomcat/work目录中的内容

  2. # 2 楼答案

    您是否尝试过使用tomcat用户界面进行部署

    请按照此处的教程进行操作:http://www.netadmintools.com/art340.html

    本教程适用于windows和linux。如果您在windows上,请重新启动服务以使新用户生效

  3. # 3 楼答案

    如果您使用Ant构建war,您可以使用Tomcat提供的库(我相信是catalina-Ant.jar)从构建中部署和取消部署您的webapp。xml