为了账号安全,请及时绑定邮箱和手机立即绑定

web程序war包发布到tomcat的webapps下会解压俩次?

web程序war包发布到tomcat的webapps下会解压俩次?

肥皂起泡泡 2019-02-18 09:07:20
Linux环境. 假设我的war包名为project.war 发布到tomcat的webapps下, 到bin目录下执行./startup.sh启动命令 之后webapps目录下出现ROOT文件夹和project文件夹. 而且启动时看logs/catalina.out感觉项目启动了俩次. 是我的server.xml哪里配置错了吗?还是本身就应该这样呢? 下面是server.xml的配置内容 <?xml version='1.0' encoding='utf-8'?> <Server port="18003" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <Listener className="org.apache.catalina.core.JasperListener" /> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <GlobalNamingResources> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <Service name="Catalina"> <Connector port="18082" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <Connector port="18011" protocol="AJP/1.3" redirectPort="8443" /> <Engine name="Catalina" defaultHost="localhost"> <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="../webapps/projectName" debug="0" reloadable="true" crossContext="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" /> </Host> </Engine> </Service> </Server>
查看完整描述

2 回答

?
largeQ

TA贡献2039条经验 获得超7个赞

你从哪里判断他解压了两次?

查看完整回答
反对 回复 2019-03-01
  • 2 回答
  • 0 关注
  • 720 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信