tomcat——context.xml
本机tomcat位置:D:\tomcat7\apache-tomcat-7.0.61
context.xml
位置:D:\tomcat7\apache-tomcat-7.0.61\conf
每个Web应用程序将加载此文件的内容。
tomcat服务器会定时去扫描这个文件。一旦发现文件被修改(时间戳改变了),就会自动重新加载这个文件,而不需要重启服务器。
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context> <!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
--> <!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
--> </Context>
<WatchedResource>:指定被监视的资源,此元素可定义多个。如果WEB-INF/web.xml内容改变了,则自动重新加载改应用。
context.xml的三个作用范围
1. tomcat server级别:
在/conf/context.xml里配置
2. Host级别:
在/conf/Catalina/${hostName}里添加context.xml,继而进行配置
3. web app 级别:
在/conf/Catalina/${hostName}里添加${webAppName}.xml,继而进行配置
参考文档:
Tomcat的context.xml说明、Context标签讲解
tomcat——context.xml的更多相关文章
- embedded tomcat context.xml
在网络下载相关的embedded tomcat jar.也可直接在maven中检索. 在main方法中,输入以下代码: //新建tomcat实例 Tomcat tomcat = new Tomcat( ...
- Tomcat 部署:工程下 META-INF 目录下的 Context.xml
tomcat 在META-INF 文件夹中添加context.xml,使项目自动应用更新文件 Meta-inf文件夹下新建context.xml. <Context path="/FU ...
- Tomcat 的context.xml
1. 在tomcat 5.5之前: --------------------------------------------------------------- Context体如今/conf/se ...
- Tomcat中的Context.xml的<Loader delegate="true"/>
Tomcat中的Context.xml的<Loader delegate="true"/> 1.<Loader delegate="true" ...
- Tomcat下使用C3P0配置JNDI数据源(在项目的META-INF目录下创建context.xml的文件)
一.C3P0下载 C3P0下载地址:http://sourceforge.net/projects/c3p0/files/?source=navbar 下载完成之后得到一个压缩包
- tomcat配置文件context.xml和server.xml分析
在tomcat 5.5之前Context体现在/conf/server.xml中的Host里的<Context>元素,它由Context接口定义.每个<Context元素代表了运行在 ...
- 在tomcat下context.xml中配置各种数据库连接池(JNDI)
1. 首先,需要为数据源配置一个JNDI资源.我们的数据源JNDI资源应该定义在context元素中.在tomcat6版本中,context元素已经从server.xml文件中独立出来了,放在一个 ...
- Tomcat 的context.xml说明、Context标签讲解
Tomcat的context.xml说明.Context标签讲解 1. 在tomcat 5.5之前 --------------------------- Context体现在/conf/server ...
- Tomcat的context.xml说明、Context标签讲解
Tomcat的context.xml说明.Context标签讲解 1. 在tomcat 5.5之前 --------------------------- Context体现在/conf/server ...
随机推荐
- Spring Boot-日志配置(超详细)
Spring Boot-日志配置(超详细) 更新日志: 20170810 更新通过 application.yml传递参数到 logback 中. Spring Boot-日志配置超详细 默认日志 L ...
- wordpress 后台添加 快速编辑 栏目
前两篇其实是同一篇,都是讲在后台添加菜单类型的http://www.ashuwp.com/courses/highgrade/664.htmlhttps://shibashake.com/wordpr ...
- 使用不同代理IP刷票的脚本---requests
投票功能限制刷票是通过限制单个IP的投票次数实现的,所以写了个脚本用于测试此功能. #-*- coding=utf-8 -*- ''' 功能:此脚本用于用不同的IP刷票 作者:Elle 最后修改日期: ...
- Python笔记002-Python编程基础概念
第二章(1):Python编程基础概念 1. Python 程序的构成 Python 程序有模块组成.一个模块对应 Python 源文件,一般后缀名是:.py. 模块有语句组成.运行 Python程序 ...
- scratch少儿编程第一季——07、人要衣装佛靠金装——外观模块
各位小伙伴大家好: 上期我们学习了如何设置背景,和设计一个小项目总结了动作模块. 本期开始我们学习外观模块下的指令. 首先我们来看看前面两个指令 第一个指令是在角色对象上出现一个对话框,显示角色所说的 ...
- Springcloud 引导上下文
SpringCloud为我们提供了bootstrap.properties的属性文件,我们可以在该属性文件里做我们的服务配置.可是,我们知道SpringBoot已经为我们提供了做服务配置的属性文件ap ...
- angular select 的第一行option 空白问题
记录一下这个问题的解决方案 <select class="form-control" ng-init="vm.columnId = vm.columnList[0] ...
- C# 交换排序
用交换排序的方式实现对int类型的数组arrays从小到大排序 思路: 第一步:一个长度为n的数组,把最小的放第一行,第二小的数字放第二行,,,, 0(0为数组的第一项) 第一小的数字 1 ...
- Vue命名路由
Vue命名路由 <!DOCTYPE html> <html lang="en"> <head> <meta charset="U ...
- vue基本语法概要(一)
先看两种代码,再进行讲解 第一种格式: <template > <div> <div v-for=" item in sites "> < ...