Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Annu
Reply With Quote
  #2 (permalink)  
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
Default

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
http://iam-rakesh.blogspot.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.