如何用来自WEB-INF/lib的服务器jar覆盖服务器jar或改用它们?
问题描述:
我有Web应用程序,应该使用WEB-INF/lib中包含的JSF 2.0库...但是它没有...而不是因为我的服务器(JBoss 4.2)还提供了JSF库而出现异常.
i have Web Application which should use JSF 2.0 libraries included in WEB-INF/lib... but it does not... instead of i'm getting exception because my server (JBoss 4.2) also provides JSF libraries...
如何强制我的应用程序使用WEB-INF/lib中的.jar?
How can i force my application to use .jar's from WEB-INF/lib ?
注意:当我从服务器上删除JSF库时,我的应用程序将按预期运行.
Note: When i removed JSF libs from server, my application runs as it should.
答
告诉JBoss您的WAR已经通过Webapp的web.xml
中的以下条目捆绑了JSF.
Tell JBoss that your WAR already bundles JSF by the following entry in your webapp's web.xml
.
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>