1. <Context docBase="zjzc-web-api" path="/api" reloadable="false"/>
  2.  
  3. 1.修改<Host>的appBase为自己的实际开发目录,如appBase="d:/test"
  4. 2.紧接<Host>的后面,添加:<context docBase="/" path="" reloadable="true" debug="0"></context>,docBase是指相对于appBase而言,它既
  5.  
  6. 可以是相对路径,也可以是绝对路径,在这里我将它指定为"/",即位于"d:/test"下,path="",表示访问的时候直接用localhost即可,不必添加任何其它
  7.  
  8. 路径,当然也可以把它设置为一个名字(可随便命名),访问时就可以使用本名字进行访问.
  9.  
  10. 该web应用的文档基准目录(Document Base,也称为Context Root),或者是WAR文件的路径。可以使用绝对路径,也可以使用相对于context所属的
  11.  
  12. Host的appBase路径。
  13.  
  14. docbase是web应用和本地路径,path是tomcat访问这个应用的URL路径。
  15.  
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27.  
  28. api01:/usr/local/apache-tomcat-7.0.55_8082/webapps> cd zjzc-web-api
  29. api01:/usr/local/apache-tomcat-7.0.55_8082/webapps/zjzc-web-api> ls
  30. index.html manual_1480579979196.html manual_1480988020607.html manual_1480993231061.html
  31.  
  32. manual_1481251530133.html test.html WEB-INF
  33. manual_1480562090655.html manual_1480659542284.html manual_1480988329608.html manual_1481078979827.html META-INF
  34.  
  35. velocity.log zjzc-web-api-1.1.17.war
  36. api01:/usr/local/apache-tomcat-7.0.55_8082/webapps/zjzc-web-api> pwd
  37. /usr/local/apache-tomcat-7.0.55_8082/webapps/zjzc-web-api

tomcat docBase 和 path的更多相关文章

  1. Can a Tomcat docBase span multiple folders?--转

    Question: I apologize if this is a poor question, but I'm using Windows and looking to see if there' ...

  2. Tomcat/conf/server.xml文件中docBase和path的说明

    Tomcat的项目部署方式有以下三种: 1.直接把项目复制到Tomcat安装目录的webapps目录中,这是最简单的一种Tomcat项目部署的方法.2.在tomcat安装目录中有一个conf文件夹,打 ...

  3. tomcat修改上下文path

    server.xml <Host name="localhost" appBase="webapps" unpackWARs="true&quo ...

  4. tomcat 7 WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []

    tomcat 7 WARNING: A context path must either be an empty string or start with a '/' and do not end w ...

  5. tomcat server.xml context path配置需要注意的事情

    在tomcat下放个war包,假如我是这样配置server.xml的,<Context docBase="eggchina" path="/yanan" ...

  6. tomcat部署应用时设置context path为空的上下文路径问题

    在server.xml中添加<Context>元素,配置如下: <Context docBase="app" path="" reloadab ...

  7. Eclipse下配置javaweb项目快速部署到tomcat

    用惯了VS,再用Eclipse,完全有一种从自动挡到手动挡的感觉啊. 很多同学在Eclipse下开发web项目,每一次修改代码,看效果的时候都有右键项目->Run as -> Run on ...

  8. Tomcat基本入门知识及发布,虚拟访问及启动碰到的错误,虚拟目录,虚拟路径,各种Tomcat的配置

    Tomcat容器入门介绍 转自javaresearch.com由timgball 整理 Tomcat是一个免费的开源Web服务器,最新版本是5.5.1,支持Servlet2.4,JSP2.0,非常适合 ...

  9. tomcat 配置项目指定域名

    <Host name="www.xxx.com" appBase="D:/tomcat/webapps/web"> <alias>xxx ...

随机推荐

  1. vs2010开发android的准备工作

    安装 Mono for Android for Visual Studio 2010 需要下面4个步骤: 安装 JDK 安装 Android SDK 配置模拟器 安装 Mono for Android ...

  2. ios 获取字符串所需要占用的label的高度

    //    设置字体大小 UIFont *fnt=[UIFont systemFontOfSize:16]; NSDictionary *attribute = @{NSFontAttributeNa ...

  3. JavaScript学习笔记(5)——JavaScript语法之数据类型

    JavaScript 拥有动态类型.这意味着相同的变量可用作不同的类型: var x // x 为 undefined var x = 6; // x 为数字 var x = "Bill&q ...

  4. OC2_数组操作

    // // main.m // OC2_数组操作 // // Created by zhangxueming on 15/6/11. // Copyright (c) 2015年 zhangxuemi ...

  5. [leetcode] 399. Evaluate Division

    我是链接 看到这道题,2个点和一个权值,然后想到图,但是leetcode就是这样,没给数据范围,感觉写起来很费劲,然后就开始用图来做,添加边的时候,注意正向边和反向变,然后查询的时候,先判断2个点是否 ...

  6. 九度OJ 1446 Head of a Gang -- 并查集

    题目地址:http://ac.jobdu.com/problem.php?pid=1446 题目描述: One way that the police finds the head of a gang ...

  7. hdu 5094 Maze 状态压缩dp+广搜

    作者:jostree 转载请注明出处 http://www.cnblogs.com/jostree/p/4092176.html 题目链接:hdu 5094 Maze 状态压缩dp+广搜 使用广度优先 ...

  8. Linux内核Radix Tree(三):API介绍

    1.     单值查找radix_tree_lookup 函数radix_tree_lookup执行查找操作,查找方法是:从叶子到树顶,通过数组索引键值值查看数组元素的方法,一层层地查找slot.其列 ...

  9. Unity帮助文档打开速度慢解决方法

    使用批量文本替换工具替换掉Unity安装目录中\Editor\Data\Documentation\en\Manual\下的所有文件中的如下两个部分:   1. <script type=&qu ...

  10. PHPCMS二次开发教程(转)

    转自:http://www.cnblogs.com/semcoding/p/3347600.html PHPCMS V9 结构设计 根目录 |–api  结构文件目录 |–caches 缓存文件目录 ...