Redian新闻
>
JSP How to Invoke the Specific version of Xerces-J
avatar
JSP How to Invoke the Specific version of Xerces-J# Java - 爪哇娇娃
C*r
1
Our server has different versions of Xerces-J installed, from 1.9 to 2.8
My project has to use Xerces-J 2.8 and I have Xerces-J.2.8.jar under my
project /WEB-INF/lib
How can I make my project invoke /WEB-INF/lib/ 2Xerces-J.2.8.jar without
changing system's classpath?
avatar
r*l
2
In one sentence: you should not put xerces.jar in classpaths
that are loaded by the web application's parent classloader.
It should not be put in the java ext library path, $CLASSPATH,
web/app servers common lib, domain lib and maybe more. If
other apps need to use this jar, they should have their own.

【在 C**********r 的大作中提到】
: Our server has different versions of Xerces-J installed, from 1.9 to 2.8
: My project has to use Xerces-J 2.8 and I have Xerces-J.2.8.jar under my
: project /WEB-INF/lib
: How can I make my project invoke /WEB-INF/lib/ 2Xerces-J.2.8.jar without
: changing system's classpath?

avatar
t*e
3
It depends on how classloader is implemented by the web server. For example,
WebLogic allows you to specify from which classloader you want to load the
jar.
avatar
m*t
4

Configure your appserver so that the web app classloader will only ask
the parent classloader if it can't find a resource by itself. Note that
that is the opposite of the java classloading delegation protocol.

【在 C**********r 的大作中提到】
: Our server has different versions of Xerces-J installed, from 1.9 to 2.8
: My project has to use Xerces-J 2.8 and I have Xerces-J.2.8.jar under my
: project /WEB-INF/lib
: How can I make my project invoke /WEB-INF/lib/ 2Xerces-J.2.8.jar without
: changing system's classpath?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。