wood burning stoves 2.0*
The moose likes JSF and the fly likes How do I connect to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How do I connect to database" Watch "How do I connect to database" New topic
Author

How do I connect to database

Mansingh Shitole
Greenhorn

Joined: Jun 10, 2008
Posts: 4
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

Joined: Jun 11, 2002
Posts: 140
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
 
subject: How do I connect to database
 
Similar Threads
XHTML inetraction with database
JSF application on Apacher web server and Tomcat
Need help in xhtml files
JSF problem
Passing files