使用eclipse制作war包方法 web项目打包到tomcat

2024-10-26 10:02:37

1、打开eclipse在左侧右击项目名选择“Export”

使用eclipse制作war包方法 web项目打包到tomcat

2、在导出画面点击 “Web”->“WAR file”点击“Next”

使用eclipse制作war包方法 web项目打包到tomcat

3、点击“Browse…”选择文件的导出位置,Target runtime 运行环境选择 tomcat的版本 点击 Finsh

使用eclipse制作war包方法 web项目打包到tomcat

4、到此war包制作完成,生成的目录结构如下

使用eclipse制作war包方法 web项目打包到tomcat

5、将生成的war文件放到 tomcat的安装目录/webapps里面

使用eclipse制作war包方法 web项目打包到tomcat

6、重启tomcat war包自动解压成文件夹 ,通过浏览器可以直接访问了

使用eclipse制作war包方法 web项目打包到tomcat
猜你喜欢