1.修改默认站点目录,修改server.xml,docs位于webapps中,workDir为绝对路径。默认为root。
      <Host name="localhost"  appBase="webapps"
            unpackWARs
="true" autoDeploy="true"
            xmlValidation
="false" xmlNamespaceAware="false">
  
<Context   path=""   docBase="docs"   workDir="C:\Program Files\Apache Software Foundation\Tomcat 6.0\work"   reload="true" 

  
/>

      
</Host>

2.修改默认访问文件,修改web.xml
   <welcome-file-list>
        
<welcome-file>abc.html</welcome-file>
        
<welcome-file>index.html</welcome-file>
        
<welcome-file>index.htm</welcome-file>
        
<welcome-file>index.jsp</welcome-file>
    
</welcome-file-list>

3.修改默认端口8080,修改server.xml
  <Service name="Catalina">
    
<Connector port="8000" protocol="HTTP/1.1" 
               maxThreads
="150" connectionTimeout="20000" 
               redirectPort
="8443" />

4.修改Tomcat应用程序目录
   <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
   autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false">
  // 修改成
   
<Host name="localhost" debug="0" appBase="mytest" unpackWARs="true"
   autoDeploy
="true" xmlValidation="false" xmlNamespaceAware="false">
  // mytest目录是和webapps在同一父目录下。

相关文章:

  • 2021-12-28
  • 2021-06-26
  • 2022-01-13
  • 2021-08-13
  • 2021-11-20
  • 2021-09-21
  • 2021-04-23
  • 2022-02-15
猜你喜欢
  • 2021-12-12
  • 2022-01-24
  • 2021-06-03
  • 2021-06-10
  • 2021-07-10
  • 2021-04-28
相关资源
相似解决方案