Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i retrive ResultSet object into Jsp page

 
mlkr reddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 bean.in 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...
by
mlkreddy

[Edited by Dave - code tags added, email address removed]
[ July 07, 2005: Message edited by: David O'Meara ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Dave
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mlkr reddy,
No cross post .
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Srinivasa Raghavan:
mlkr reddy,
No cross post .



Thanks, Fixed!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic