This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes java jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java jsp" Watch "java jsp" New topic
Author

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java jsp
 
Similar Threads
JSP and Java
Regarding drawbacks of JSP
jsp generated jnlp file does not work
java bean..
Best Book for jsp?