在server.xml 下配置 需重新启动服务器。
1 、 当访问路径不需要写端口是将8080改为80
<Connector port="80" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
2、虚拟路径配置
(1) copy D:\常用软件\tomcat\tomcat安装\Tomcat 5.5\webapps\root\ 的WEB-INF 放到你需要的路径文件夹下E:\itdemoTest
(2)修改server.xml建立映射 :
- <Host name="localhost" appBase="webapps"
- unpackWARs="true" autoDeploy="true"
- xmlValidation="false" xmlNamespaceAware="false">
- <!-- 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 -->
- <!--
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
- prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
- -->
- <Context path="/itdemo" docBase="E:\itdemoTest"/>
- </Host>