Can JSF 2.0 be used with WebSphere Application Server version 7.x?
If so, how?
Following worked for me
Change web.xml as following
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
Thats it .
Thank you guys!
It worked with a newer version of javax.faces. See the maven dependencies:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.1.29-08</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.sun.el</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
</dependency>
Don't forget to add the following in your web.xml:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
And finally change the WebSphere class loader order of the application and the module to the (parent last) settings: https://www.ibm.com/support/knowledgecenter/SSAW57_7.0.0/com.ibm.websphere.nd.doc/info/ae/ae/urun_rclassloader_inst.html
Regards
Websphere ships with JSF 1.2.something and it loads that by default. To use a different JSF library (or any other library that WS provides such as commons-logging) you need to change the way the classloader prioritizes locations. They call it 'parent last" meaning load your libs then the WS versions.
Hi I could run my website using this libraries
Configuring in web.xml of my project
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
Configuring in websphere to load my libraries (Parent Last)
Regards
Step by step setting MyFaces 2.0 on WebSphere Application Server v7 as shared library as IBM recommends: http://wasbehindtheglass.blogspot.co.uk/
I have applied similar steps for Majorra/JSF 2.0.4 and created a shared library using only jsf-api.jar and jsf-impl.jar. As @Ian McLaird has told WAS 7.0.0.19 and JSF 2.0.4 are required. JSF 2.1.x requires Servlet 3 and is not supported by WAS7
The WebSphere Infocenter indicates that the right way to change to an alternative JSF implementation is to create a WebSphere Shared Library with the isolated classloader option enabled.
Any modules that need JSF 2 would be associated with the new shared library, and then the application would start with JSF 2 instead of JSF 1.2.
It is also necessary to have fix pack 7.0.0.19 or later installed.