zoukankan      html  css  js  c++  java
  • tomcat docBase 和 path

    		<Context docBase="zjzc-web-api" path="/api" reloadable="false"/>
    
        1.修改<Host>的appBase为自己的实际开发目录,如appBase="d:/test"
          2.紧接<Host>的后面,添加:<context docBase="/" path="" reloadable="true" debug="0"></context>,docBase是指相对于appBase而言,它既
    
    可以是相对路径,也可以是绝对路径,在这里我将它指定为"/",即位于"d:/test"下,path="",表示访问的时候直接用localhost即可,不必添加任何其它
    
    路径,当然也可以把它设置为一个名字(可随便命名),访问时就可以使用本名字进行访问.
    
    
    该web应用的文档基准目录(Document Base,也称为Context Root),或者是WAR文件的路径。可以使用绝对路径,也可以使用相对于context所属的
    
    Host的appBase路径。
    
    
    docbase是web应用和本地路径,path是tomcat访问这个应用的URL路径。
    
    
    10.168.102.19 - - [09/Dec/2016:21:22:26 +0800] "POST /api/client/info HTTP/1.1" 200 482 0.062  121.40.238.78
    10.168.102.19 - - [09/Dec/2016:21:22:27 +0800] "POST /api/client/holdinglistbyuser HTTP/1.1" 200 4625 0.152  120.26.75.177
    10.168.255.134 - - [09/Dec/2016:21:22:27 +0800] "POST /api/notice/list HTTP/1.1" 200 28886 0.162  121.40.238.78
    10.168.102.19 - - [09/Dec/2016:21:22:57 +0800] "POST /api/common/getdate HTTP/1.1" 200 171 0.046  121.40.238.78
    10.168.255.134 - - [09/Dec/2016:21:22:58 +0800] "POST /api/news/index/list HTTP/1.1" 200 63 0.051  120.26.75.177
    10.168.255.134 - - [09/Dec/2016:21:22:58 +0800] "POST /api/auctioncommon/npa/list HTTP/1.1" 200 142 0.067  120.26.75.177
    10.168.102.19 - - [09/Dec/2016:21:22:58 +0800] "POST /api/news/list_new_page HTTP/1.1" 200 24161 0.074  121.40.238.78
    10.168.102.19 - - [09/Dec/2016:21:22:59 +0800] "POST /api/index/basicdata HTTP/1.1" 200 118 0.076  121.40.238.78
    10.168.102.19 - - [09/Dec/2016:21:24:19 +0800] "POST /api/common/getdate HTTP/1.1" 200 171 0.057  120.26.75.177
    10.168.255.134 - - [09/Dec/2016:21:24:19 +0800] "POST /api/product/list HTTP/1.1" 200 5364 0.160  121.40.238.78
    10.168.255.134 - - [09/Dec/2016:21:24:19 +0800] "POST /api/wze/user/wzeUserInfo HTTP/1.1" 200 62 0.116  120.26.75.177
    
    
    api01:/usr/local/apache-tomcat-7.0.55_8082/webapps> cd zjzc-web-api
    api01:/usr/local/apache-tomcat-7.0.55_8082/webapps/zjzc-web-api> ls
    index.html                 manual_1480579979196.html  manual_1480988020607.html  manual_1480993231061.html  
    
    manual_1481251530133.html  test.html     WEB-INF
    manual_1480562090655.html  manual_1480659542284.html  manual_1480988329608.html  manual_1481078979827.html  META-INF                
    
       velocity.log  zjzc-web-api-1.1.17.war
    api01:/usr/local/apache-tomcat-7.0.55_8082/webapps/zjzc-web-api> pwd
    /usr/local/apache-tomcat-7.0.55_8082/webapps/zjzc-web-api

  • 相关阅读:
    ssh无密码登录 及集群分发脚本
    Hbase安装及客户端测试及笔记
    Zookeeper 的分布式安装部署及客户端测试
    搭建hadoop-完全分布式模式
    虚拟机的linux没有mac地址
    servlet-Listener 的复习
    纯servlet 达到spring的自动装配
    JDBC的复习 和工具类总结
    C#中的弱事件(Weak Events in C#)
    WeakReference(弱引用)
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6198932.html
Copyright © 2011-2022 走看看