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

  • 相关阅读:
    Angular2 组件通信
    vue跨组件通信的几种方法
    Angular React 和 Vue的比较
    vue对比其他框架
    ReactJS 生命周期、数据流与事件
    LeetCode 1089. 复写零(Duplicate Zeros) 72
    LeetCode 421. 数组中两个数的最大异或值(Maximum XOR of Two Numbers in an Array) 71
    12
    11
    10
  • 原文地址:https://www.cnblogs.com/qianlizeguo/p/6835478.html
Copyright © 2011-2022 走看看