File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


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