在 tomcat/conf/Catalina/localhost 新建文件 wmc.xml apache
<Context path="" docBase="/usr/local/xy_wmc" reloadable="true" crossContext="false"/>
其中ContextPath 的路徑爲 /wmc 就是文件名tomcat
若是不想要ContextPath 那麼要建立 ROOT.xml 文件.net
<Context path="" docBase="/usr/local/xy_wmc" reloadable="true" crossContext="false"/>
<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol" connectionTimeout="20000" redirectPort="8443" maxThreads="300" minSpareThreads="100" acceptCount="1000" debug="0" disableUploadTimeout="true" useBodyEncodingForURI="true" enableLookups="false" URIEncoding="UTF-8" maxPostSize="10240000" />
https://blog.csdn.net/dujianxiong/article/details/82350094debug