如何设置 J2EE 应用程序 (ear) 以在 weblogic 11g 中使用共享 JSF 和 JSTL 库?
我正在尝试将 J2EE 应用程序部署到 Weblogic。它由 web 模块和 ejb 模块组成。 我的 Web 模块使用 JSF 1.2 和 JSTL 1.2。 我已将这两个库部署到 Weblogic,然后将我的 WebModule 指向使用这些库 在 weblogic.xml 中
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app/1.0
http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<context-root>/dailyplanner</context-root>
<library-ref>
<library-name>jsf</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
<library-ref>
<library-name>jstl</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
</weblogic-web-app>
,如果我仅将 WebModule 部署为独立应用程序,则一切正常。
然后我在 weblogic-application.xml (位于 ejb/META-INF 内)中设置了整个应用程序以使用这些库,
<weblogic-application xmlns="ttp://www.bea.com/ns/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application/1.0
http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
<library-ref>
<library-name>jsf</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
<library-ref>
<library-name>jstl</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
</weblogic-application>
但如果我现在尝试部署整个 J2EE 应用程序(ear 文件),weblogic由于缺少 JSF 和 JSTL 类,将无法部署它。
我应该怎么做才能让我的 J2EE 应用程序在 weblogic 中使用共享 JSF 和 JSTL 库?
谢谢
I'm trying to deploy J2EE application to Weblogic. It consists of web-module and ejb-module.
My web-module uses JSF 1.2 and JSTL 1.2.
I've deployed both libraries to Weblogic and then point my WebModule to use these libraries
in weblogic.xml
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app/1.0
http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<context-root>/dailyplanner</context-root>
<library-ref>
<library-name>jsf</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
<library-ref>
<library-name>jstl</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
</weblogic-web-app>
All works fine, if I deploy only WebModule as a standalone application.
Then I've set up the whole application to use these libraries with the following code in weblogic-application.xml (which is inside ejb/META-INF)
<weblogic-application xmlns="ttp://www.bea.com/ns/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application/1.0
http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
<library-ref>
<library-name>jsf</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
<library-ref>
<library-name>jstl</library-name>
<specification-version>1.2</specification-version>
<implementation-version>1.2</implementation-version>
<exact-match>false</exact-match>
</library-ref>
</weblogic-application>
But If I try to deploy the whole J2EE application (ear file) now, weblogic will fail to deploy it due to missing JSF and JSTL classes.
What should I do to point my J2EE application to use shared JSF and JSTL libraries in weblogic?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将战争中的配置保留在耳内。
Try keeping the configuration in the war inside the ear.