• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JSF Spring integration

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


web.xml:


application-Context.xml:


faces-config.xml:


User.java:


UserDAO:


UserBean (as my backing bean) :



index.jsp:


wyswietl.jsp:


After running application, jsf works, in my mysql it creates two tables as I wanted, but I can't save any users no matter how many i add new user from my web application, it doesn't work.
 
Saloon Keeper
Posts: 28745
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to link Spring and JSF together. There's a reference you can put in the faces-config application element that allows the JSF EL processor to see Spring beans, making them inectable into JSF managed beans. I can't recall the name - they recently changed it. However, the older mechanism looked like this:

 
reply
    Bookmark Topic Watch Topic
  • New Topic