Believe it or not. Here it is. WebLogic Server finaly supports JSF 2.0 with it's latest release 10.3.3.0.
And here is the short howto:
- Download and install one of the latest Oracle WebLogic Server 11g Rel 1 (10.3.3) Installers from OTN. (Give the ZIP Installer a try. Aweseome lightweight!)
- Create a new sample domain (call it whatever you want) and start the admin server
- Open the administration console (http://localhost:7001/console/)
- deploy the JSF 2.0 library (Deployments - Install - wlserver_10.3\common\deployable-libraries\jsf-2.0.war
- Find your favorite JSF 2.0 sample (I'll take the guessNumber thing from the mojarra-2.0.2 distribution)
- Add a weblogic.xml file to the WEB-INF/ folder with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
<library-ref>
<library-name>jsf</library-name>
<specification-version>2.0</specification-version>
<implementation-version>1.0.0.0_2-0-2</implementation-version>
<exact-match>true</exact-match>
</library-ref>
</weblogic-web-app>
- Package the guessNumber app
- Deploy the app to the WebLogic server
- give it a try: http://localhost:7001/guessNumber
As you can see, the new JSF 2.0 features are available :) great work!
And the best of all, this is not even explicitly mentioned in the "what's new documentation for WLS" :) A single line indicates JSF support for 2.0, 1.2, 1.1.
WebLogic Server 10.3.3.0 released. It now has JSF 2.0 support!!
08:30
11
Hi,
ReplyDeleteHow we can use JSF2.0 on weblogic 10.3.0?
Regards,
imran
Hi imran raza khan,
ReplyDeleteas far as I know, there is no way to do this. You need at alst 10.3.3
Subject: JSF 2 annotations not working on weblogic 10.3.3
ReplyDeleteI have installed JSF 2 support on Weblogic 10.3.3 version using the above instructions
When I run a sample application which basically calls a bean action like
#{someBean.someMethod}
and that bean is declared SomeBean.java
with annotation @ManagedBean and @SessionScoped
(I am sure its not some capitalization error - I am aware the SomeBean.java can be used as someBean (with lowercase 's') in the xhtml page
when I simply use @ManagedBean annotation)
AT runtime I get the error
javax.el.PropertyNotFoundException:abc.xhtml
@25,55 action="#{someBean.someMethod}": Target Unreachable, identifier 'someBean' resolved to null
I can run this sample webapp without any problems (using annotations) on tomcat 6.0 web server.
I have packaged the following jars in the WEB-INF/lib folder to resolve compile-time dependencies.
jsf-api.jar
jsf-impl.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
PLEASE NOTE:
This sample webapp works fine on weblogic 10.3.3 - if I remove those annotations and declare the managed beans using traditional JSF 1.2.x way in faces-config.xml - and only fails when I bring back the annotations in the managed bean code (and remove the xml declaration from faces-config.xml)
which makes me believe that the annotations are not working.
please help.
Hi leofoto,
ReplyDeletethis sounds like the needed DI jar is not used. Have you tried tropping the jsf*.jars from WEB-INF lib? This should do the trick.
Let me know, if it helps.
Thanks for your input.
ReplyDeletei removed them. then I started getting ViewExpiredException on every button press.
seems like I have hit a bug in OEPE tooling. When I deploy the same application from with in eclipse environment by right clicking on the project --> Run on Server --> select weblogic 10.3.3 from the list of server --> Finish In this case my annotations in JSF2 web applications are not working. I get the above mentioned ViewExpiredException. But when I export the same project by right clicking --> export --> war file and drop the same war file into the same server's autodeploy folder everything works just fine in this second case. I have mentioned above the links to the app I'm deploying...
complete details for this issue can be read at :
http://stackoverflow.com/questions/3560534/jsf-2-annotations-not-working-on-weblogic-10-3-3
I have web application working fine in Weblogic 9.1, deploying the same war file in Weblogic 10 3 3, my Server is crashing.
ReplyDeleteIs there any upgrade steps to be followed
Hi Luke,
ReplyDeleteNeed more details. Exceptions? Messages? Have you looked at the dd Schema? Updated them?
M
Hi Markus
ReplyDelete- JSF 2.0 Library deployed
- weblogic.xml as described above
I have an application using RichFaces 4.0. At first glance it seems that it workes fine. But during deployment i get the following error:
[...]
Apr 6, 2011 3:51:14 PM com.sun.faces.config.AnnotationScanner processClasspath
SEVERE: Unable to process annotations for url, zip:C:/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/ivz-web/6m5hs4/war/WEB-INF/lib/richfaces-core-impl-4.0.0.Final.jar!/META-INF/faces-config.xml. Reason: java.io.FileNotFoundException: zip:C:/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/ivz-web/6m5hs4/war/WEB-INF/lib/richfaces-core-impl-4.0.0.Final.jar
[...]
Any idea what the problem could be?
Thanks & salute,
sebastian
@Sebastian:
ReplyDeleteI tried it with the 10.3.4.0 today and deployed the showcase. Everything works fine. In both expoded and packaged way. Are us using the 10.3.3.0? I think I remember issues with classloading. Try to deploy in exploded mode! Or switch to latest version of WLS!
-M
Hi Markus
ReplyDeleteDeploying in exploded mode didn't help..
Now i upgraded from 10.3.3.0 to 10.3.4.0 and it works fine :-)
Thanks a lot for your help!
Sebastian
Hi,
ReplyDeleteWe tried it on a WL server 10.0 and it worked.
:)
Thanks!
Petula