Enterprise grade Java.
You'll read about Conferences, Java User Groups, Java, Integration, Reactive, Microservices and other technologies.

Tuesday, July 7, 2009

JSF 2.0-BETA 1 on Oracle Weblogic 10gR3

11:03 Tuesday, July 7, 2009 Posted by Markus Eisele
, , ,
As you probably may have heard: JSF2.0 is final now. Time to give the available distributions a shot. I was curious to find out, that the actual available builds of the RI are still in BETA. Therefore I had to try it with the 2.0.0 Beta1 (26 May 2009).

To deploy new JSF libraries to the Oracle Weblogic server, you have to provide a separate application library. This is after all quite simple, but you have to take some actions at all.
- grep a sample from %ORACLE_HOME%\wlserver_10.3\common\deployable-libraries
- extract the .war (e.g.jsf-1.2.war) and rename the folder appropriate (e.g. jsf-2.0.1)
- change the libraries in WEB-INF/lib (you need the jsf-api.jar, jsf-impl.jar and the jstl-1.2.jar)
- change the META-INF/MANIFEST.MF to reflect the appropriate version informations:
Specification-Version: 2.0
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: JSF Reference Implementation (Mojarra 2.0.0 BETA1)
Implementation-Version: 2.0.1
- add a WEB-INF/classes folder and add the com.bea.faces.WeblogicInjectionProvider.class class to it
- last part is to zip everything together again and have a jsf-2.0.1.war

Now you are able to deploy the new library to the WLS. Make shure to add the managed library to your applications weblogic.xml.


and try out some samples. I came across several issues:
- It seems as if neither the com.sun.faces.taglib.jsf_core.BeanValidatorTag nor the com.sun.faces.taglib.jsf_core.RequiredValidatorTag are part of the distribution at the moment. Trying to start the samples app, leads to a class not found error. Only fix for now is to remove the Tags from the jsf_core.tld.
- Not all new @Annotations are processed with the WeblogicInjectionProvider for now. Therefore, even the simplest examples do not work as they should with this version.

Let's see, what happens with the final release, and how we could deploy this to the WLS :)

[UPDATE: 14.07.09]
Even the latest Oracle Fusion Middleware and within it the Oracle Weblogic still only supports JSF At the moment it is simply not possible to run JSF 2.0 on top of Weblogic Server.