File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes java jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java jsp" Watch "java jsp" New topic

java jsp

nikhil govind
Ranch Hand

Joined: Mar 08, 2011
Posts: 31
i have written a query in java and stored in a resultset object
now to send it to jsp what should i do
what code is needed in jsp ?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33098

In Java, you should read the data from the result set and put it the request with request.setAttribute. Usually it goes in an arraylist of some custom object. Then in the JSP, you use JSTL to loop through the list and display the relevant data.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: java jsp
It's not a secret anymore!