如何将自己的项目设为tomcat默认项目

 修改tomcat下的server.xml文件

 在<host></host>标签中添加

<Host name="localhost"  appBase="webapps"

            unpackWARs="true" autoDeploy="true">

                <Context path="" docBase="springmvc(项目名称)" reloadable="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"

               prefix="localhost_access_log." suffix=".txt"

               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>

猜你喜欢

转载自blog.csdn.net/ly975com/article/details/81435456