File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how can i retrive ResultSet object into Jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how can i retrive ResultSet object into Jsp page" Watch "how can i retrive ResultSet object into Jsp page" New topic

how can i retrive ResultSet object into Jsp page

mlkr reddy

Joined: Jul 07, 2005
Posts: 3
i am using simple jsp page ,which is invocked another(2nd) jsp page.
in 2nd jsp page i am using <jsp:useBean id="ss" class="beans.SampleBean" scope="session" >

beans.SampleBean is a normal this i connect to DataBase and getting ResultSet object.I need to use that ResultSet object in to our (2nd jsp) calling jsp page. In beans.SampleBean class setting ResultSet object to Session , using session.setAttribute("name1",rs);
in jsppage i am using

in obvecode until ---1--- code is executed sucessfully. never goes to the if() or else part .what can i do and how can i retrive ResultSet object..
plz help me...

[Edited by Dave - code tags added, email address removed]
[ July 07, 2005: Message edited by: David O'Meara ]
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Firstly, a ResultSet is a database resource, you can't serialise it and send it around. I'm not sure how you line marked ---1--- works, JDBC doesn't work that way. Is the ResultSet object you're working with actually a custom class or is it the interface, because I'm not seeing this working at all

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
mlkr reddy,
No cross post .

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Originally posted by Srinivasa Raghavan:
mlkr reddy,
No cross post .

Thanks, Fixed!

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: how can i retrive ResultSet object into Jsp page
It's not a secret anymore!