开发者

How to setup J2EE aplication (ear) to use shared JSF and JSTL libraries in weblogic 11g?

开发者 https://www.devze.com 2023-01-25 18:52 出处:网络
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'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>
  &开发者_如何学JAVAlt;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


Try keeping the configuration in the war inside the ear.

0

精彩评论

暂无评论...
验证码 换一张
取 消