How to configured jsf-spring 2.7.1:
- Deleted META-INF/faces-config.xml out of the jsf-spring.jar file since the file was defective.
- had variable resolver configured in WEB-INF/faces-config.xml (restoring functionality from step 1):
<application> <variable-resolver>de.mindmatters.faces.spring.FacesSpringVariableResolver</variable-resolver> </application> - had request handler filter configured in WEB-INF/web.xml:
<filter> <filter-name>RequestHandled</filter-name> <filter-class>de.mindmatters.faces.spring.RequestHandledFilter</filter-class> </filter> <filter-mapping> <filter-name>RequestHandled</filter-name> <servlet-name>FacesServlet</servlet-name> </filter-mapping> - Had spring listener registered in WEB-INF/web.xml:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
How to integrate jsf-spring 3.0.0 M2:
- There is no META-INF/faces-config.xml file.
- I have commented out the faces-config.xml variable resolver.
I've replaced the RequestHandler class with de.mindmatters.faces.spring.support.RequestHandledFilter.
- I've commented out the spring listener.
I've added the Code Generation Library (http://sourceforge.net/projects/cglib) dependency: cglib-nodep-2.1_3.jar
An alternative without the jsf-spring library
- jsf-spring library is not the only way to integrate jsf and spring.
- Spring framework is already shipped with built-in utilities to ease the integration.
This blog entry http://cagataycivici.wordpress.com/2007/09/10/using-spring-to-manage-jsf-beans demonstrates how to do the integration using the spring's built-in features for JSF.