在项目中会遇到tomcat的一些问题
这里是我的一些问题。不断更新。。
1.配置端口号
apache-tomcat\conf\server.xml文件中修改:
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8444"/>
port 就是目前的端口号。默认是8080
2.遇到Caused by: java.lang.IllegalArgumentException: addChild: Child name '/mapapps' is not unique问题,一般是tomcat有两个相同的启动项。修改apache-tomcat\conf\server.xml文件中的最后部分只留下一个启动项即可
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/>
-->
<Context docBase="mapapps" path="/mapapps" reloadable="true" source="org.eclipse.jst.jee.server:mapapps"/></Host>