zoukankan      html  css  js  c++  java
  • 已发布的jsp项目如何在本地展示

    已发布的项目可以放到tomcat 安装目录下的webapps/下面,但是有时候我们的目录已经放好了,所在要加映射过去。

    1, 到tomcat/conf/下,打开server.xml

    2, 找到

    <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>

    3, 从这里可以看,默认目录是在webapps, 修改目录指向,添加语名:

     <Context docBase="你项目的绝对地址" path=""               reloadable="true"/>

    4, 完整的host

    <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" />

                <Context docBase="******"path=""               reloadable="true"/>

    5, 重启tomcat, 先shutup, 再startup

  • 相关阅读:
    rand()和srand()
    advanced regression to predict housing prices
    数学建模
    python的对数
    八月总结——人工智能初学者
    看到的不错的项目
    学习笔记(七): Logistic Regression
    学习笔记(六): Regularization for Simplicity
    An Intuitive Explanation of Convolutional Neural Networks
    CentOS7的mysql5.7-rpm.bundle方式安装
  • 原文地址:https://www.cnblogs.com/qianlizeguo/p/6835478.html
Copyright © 2011-2022 走看看