eclipse jsp+servlet打包war文件发布到tomcat

右击项目选址Export,选择WAR file文件导出,上传war文件到tomcat根目录

tomcat配置文件需要开启unpackWARs="true"

<Host name="localhost" appBase=""
unpackWARs="true" autoDeploy="true">

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"

prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
<Context docBase="xxx.war" path="" reloadable="true" source="org.eclipse.jst.jee.server:test"/>

</Host>

posted @ 2021-01-13 21:40  程序员小艺  阅读(296)  评论(0编辑  收藏  举报