Tayba
Tayba

Reputation: 148

Is it possible using Spring MVC + PrimeFaces?

I want to know if it is possible and how to use Spring MVC with PrimeFaces.

Upvotes: 8

Views: 23891

Answers (4)

Hassan Iqbal
Hassan Iqbal

Reputation: 49

You can do this by using MangedBean instead of @Controller and other components of Springframework like @Service @Repository . It will work in this way. I hope this will help you

Upvotes: -1

Ian
Ian

Reputation: 1

http://www.springfuse.com/. They have a mvn pom that will reverse engineer your DB schema and produce all your boiler plate code for a persistence app based on your JSF2+Primefaces3.5+springMVC3+hibernate+MySQL tech stack

Upvotes: -2

Pasha
Pasha

Reputation: 25

The technology stack you are trying to build is certainly possible (as per the link below)

I'm trying to do something similar. The technology stack I am trying to build is JSF2+Primefaces3.5+springMVC3+hibernate+MySQL on Tomcat 7 using Eclipse Juno.

I found this from google.. http://www.javacodegeeks.com/2012/04/jsf-2-primefaces-3-spring-3-hibernate-4.html

This link is what I've been trying to follow. So far, I've gotten my webapp to run on primefaces+JSF+tomcat running. I've created my own models and controllers. But I'd like to have them done through Spring MVC. This, I am currently trying to set up.

I hope it helps you move forward.

Upvotes: 1

Lev Kuznetsov
Lev Kuznetsov

Reputation: 3728

After 3 days of research I just don't think it's possible out of the box. Spring MVC with JSF exactly - Web Flow is something else. Spring Roo straight up makes you choose whether you're going to have Spring MVC or JSF.

None of the examples supposedly integrating both would work for me on latest library releases using Jetty. At this point I wouldn't be totally surprised that some of them do actually work with other containers as I did get varying results trying out a couple with Tomcat. Most examples do the same thing without explaining much - they do use the Spring MVC dispatcher servlet and declare the faces servlet separately as well and how it's supposed to work is all a mystery especially when it doesn't work.

I'm new to all this, but to me the desired thing would be for the Spring dispatcher just handle JSF2 out of the box, JSF2 has been out for a while yet I can't google up anybody trying to do that or even expressing the same sentiment; is there something inherently wrong with what I'm thinking?

Upvotes: 3

Related Questions