tomcat部署jsp项目

用eclipse开发运行调试jsp项目很方便,但是如何在不启动eclipse的情况下运行项目呢?


### 首先打开tomcat的`conf/server.xml`文件,找到`Host`标签,这里就是配置项目的地方。

appBase是默认项目的路径

<Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="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>

### 不需要对上面的配置进行修改,只需要在`Host`标签内加入`Context`标签即可,如:
``` ```
其他的配置项还不明白什么意思,继续学习!
原文地址:https://www.cnblogs.com/lantor/p/7782716.html