Conflict between Spring MVC and PrimeFaces

1

I have a problem integrating Spring MVC with PrimeFaces. It seems to give a conflict between them.

Has the configuration in web.xml

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>


<!-- Map these files with JSF -->
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsp</url-pattern>
</servlet-mapping>

the faces-config.xml file with Spring

            org.springframework.web.jsf.el.SpringBeanFacesELResolver         

And it still did not work.

I've tried this tutorial and the Spring Web-flow tutorial that talks about Spring-Faces and did not work.

The broken source code with the problem is in Github .

    
asked by anonymous 26.11.2014 / 22:43

2 answers

1

I suggest you start your project from a Maven archetype (as one of the two that enable JSF + Spring from this repository ). If you want something even more agile you can also try JSF support for Spring Roo . In both cases PrimeFaces comes preconfigured for you.

Of course there is no perfect solution and you will have to manually upgrade some libraries in the first case (if you want to work with the latest versions of Spring and PrimeFaces) and / or learn a little about Spring Roo in the second . But this tedious set-up job is for you.

    
26.11.2014 / 23:00
0

Good afternoon, guys. Many thanks Anthony for trying to help me, but I realized that was not exactly what I wanted.

What you were interested in doing is contained here: link

Thank you

    
09.12.2014 / 19:04