Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 5th, 2009, 06:27 AM
Authorized User
Join Date: Dec 2007
Location: india, kerala, India.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to annumol
Default passing data

i am doing j2ee. i want to pass a data from a query passed to jsp from servlet. how to pass

ResultSet ss=stmt.executeQuery("select no, name, address from book");

i want to print the data of resultset from servelt to jsp

Any idea

thanks in advance
Old June 25th, 2009, 06:03 AM
Friend of Wrox
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

Try creating a bean class with no, name and address properties.
Create a list of this bean type.
Loop through the Result set and create one object for each row and set the row data into the object. add this object to the list.
Set this list as request attribute
And finally forward to the jsp.
On jsp get this request attribute
Loop through the list and print the details.
- Rakesh

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Data Using Data/Bye Streams d-mart Java Basics 1 April 23rd, 2009 12:20 PM
Passing data between pages Jyothi_23 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 April 3rd, 2009 10:56 PM
Passing data between forms rwalker VS.NET 2002/2003 6 February 17th, 2005 08:17 AM
passing data texasraven HTML Code Clinic 0 March 3rd, 2004 05:03 PM
Passing URL data Brian_S Dreamweaver (all versions) 2 December 1st, 2003 08:22 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.