Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I connect to database

 
Mansingh Shitole
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our JBoss JBpm project we are using JSF for UI's and those all are xhtml files...So how do I retrive from database and display in xhtml files.
 
Darryl Nortje
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mansingh,

When you retrieve data from a db, you get a java.sql.ResultSet. You can convert each record of that result set to a custom type, say Person, and add each person to a Collection. then use jsf dataTable to render that collection.

Bob's your uncle.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic