tomcat下的公共jar包配置
1。创建my-lib文件夹
.
在conf文件中的catalina.properties中配置如下
# 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. #
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageDefinition unless the
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
# by default, no packages are restricted for definition, and none of
# the class loaders supplied with the JDK call checkPackageDefinition.
#
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. #
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar #
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank, the "common" loader will be used as Catalina's "server"
# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
server.loader= #
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
shared.loader=${catalina.base}/my-lib,${catalina.base}/my-lib/*.jar
# List of JAR files that should not be scanned using the JarScanner
# functionality. This is typically used to scan JARs for configuration
# information. JARs that do not contain such information may be excluded from
# the scan to speed up the scanning process. This is the default list. JARs on
# this list are excluded from all scans. Scan specific lists (to exclude JARs
# from individual scans) follow this. The list must be a comma separated list of
# JAR file names.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Test JARs (JUnit, Cobertura and dependencies)
tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
jasper.jar,jasper-el.jar,ecj-*.jar,\
tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
tomcat-jni.jar,tomcat-spdy.jar,\
tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
tomcat-jdbc.jar,\
tools.jar,\
commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
commons-math*.jar,commons-pool*.jar,\
jstl.jar,\
geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
jmx-tools.jar,jta*.jar,log4j.jar,log4j-1*.jar,mail*.jar,slf4j*.jar,\
xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
junit.jar,junit-*.jar,hamcrest*.jar,org.hamcrest*.jar,ant-launcher.jar,\
cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\
jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\
xom-*.jar # Additional JARs (over and above the default JARs listed above) to skip when
# scanning for Servlet 3.0 pluggability features. These features include web
# fragments, annotations, SCIs and classes that match @HandlesTypes. The list
# must be a comma separated list of JAR file names.
org.apache.catalina.startup.ContextConfig.jarsToSkip= # Additional JARs (over and above the default JARs listed above) to skip when
# scanning for TLDs. The list must be a comma separated list of JAR file names.
org.apache.catalina.startup.TldConfig.jarsToSkip=tomcat7-websocket.jar #
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000
tomcat下的公共jar包配置的更多相关文章
- linux 下检查java jar包 程序是否正常 shell
linux 下检查java jar包 程序是否正常 shell http://injavawetrust.iteye.com BATCH_SERVER="batch.jar" NR ...
- linux 下启动java jar包 shell
linux 下启动java jar包 shell #!/bin/sh JAVA_HOME=/usr/local/jdk1.6.0_34/bin/javaJAVA_OPTS="-Xmx256m ...
- linux 下停止java jar包 shell
linux 下停止java jar包 shell http://injavawetrust.iteye.com #!/bin/sh APP_HOME=/home/ap/injavawetrust/ba ...
- Linux下如何让jar包程序在后台一直执行
Linux下如何让Jar包程序在后台一直执行 shell命令 nohup java -jar xxx.jar & &:让程序后台执行. nohub:让程序控制台输出转移到nohub.o ...
- tomcat部署公共jar包
如果每次打war包都要把所有依赖jar放在WEB-INF/lib下,是很傻的做法,war包很大,也浪费内存.参考之前jboss上部署公共jar的经验,tomcat实现起来想来也不困难. 1. 参照ma ...
- springboot整合JSP以及发布项目到独立的tomcat中与打成jar包使用
之前研究了springboot整合freemarker与thymeleaf的使用.也研究了springboot发布到独立的tomcat的使用以及使用自带的tomcat打成jar包的使用,下面研究集成J ...
- springboot项目发布到独立的tomcat中运行&打成jar包运行
springboot的打包方式依赖于插件:(下面插件打出的包与普通的包目录结构有区别) <plugin> <groupId>org.springframework.boot&l ...
- Tomcat 下 mysql的连接池配置和使用
最近维护的一个项目出了问题,最后分析是卡在数据库连接池上,然后就做了些学习. 先把我自己的方法写出来,再说下网上其他的没有成功的方法. 1.首先当然是先把mysql的jar包放在lib目录下,tonc ...
- 通过buildpath 导入jar和在lib下导入的jar包区别
jar包放置在WEB-INF/lib下和通过build path导入的区别是什么? jar包直接拷贝到WEB-INF/lib下和以userLibrary形式引入的区别? jar包放置在WEB-INF/ ...
随机推荐
- SpringFox 初体验
本文来自网易云社区. 1.什么是SpringFox? 1.1 Springfox 是一个开源的API Doc的框架, 它的前身是swagger-springmvc,可以将我们的Controller中的 ...
- 死磕 java同步系列之开篇
简介 同步系列,这是彤哥想了好久的名字,本来是准备写锁相关的内容,但是java中的CountDownLatch.Semaphore.CyclicBarrier这些类又不属于锁,它们和锁又有很多共同点, ...
- BK Componet Monitor
Apache a) 启动服务前将监听地址改成0.0.0.0 b) 确认在文件“/etc/httpd/conf.modules.d/00-base.conf“中有加载mod_status模块 c) 新建 ...
- const define区别
可以使用defined()----检测常量是否设置 [问]在php中定义常量时,const与define的区别? [答]使用const使得代码简单易读,const本身就是一个语言结构,而define是 ...
- Codeforces570C 【简单标记】
题意: 给定一个长为n的字符串(包含小写字母和'.'),有m次操作 每次操作可以修改字符,并询问修改后有多少对相邻的'.' 思路: 标记. #include<bits/stdc++.h> ...
- EOS概念理解总结
本文参考EOS版本:v1.1.1 一.EOS投票相关 //用户投票1.不能自己代理自己,但可以自己给自己投票; 2.投票的生产节点名称不能重复;3.投票人设置了投票代理人后自己不能再投票;4.投票人需 ...
- linux网络配置详解
一:相关网络配置的文件 1.网卡名配置相关文件 网卡名命名规则文件: /etc/udev/rules.d/70-persistent-net.rules # PCI device 0x8086:0x1 ...
- js:数组里面获取键名和键值
在写php时用ajax异步传回的返回数组时是json格式,在js里面处理时有时需要用到键名,此时可以用in来处理 js只有数字索引: <script> var data = new arr ...
- kolla-ansible-----rally模块
Rally简介 Rally是OpenStack社区推出开源测试工具,可用于对OpenStack各个组件进行性能测试. 通过使用Rally组件,用户可完成OpenStack云计算平台的安装部署.功能验证 ...
- Jmeter-性能测试工具
0.概念和备注 //基本使用流程 测试计划-->右键 添加-> Threads(Users) --> 选择线程组 -->线程组-->右键 添加 --> Sample ...