• Post Reply Bookmark Topic Watch Topic
  • New Topic

UseBean  RSS feed

 
priya shankar
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I hava a javabean which connects to database and results a ResultSet Object ..the ResultSet objects contains a list of names...
I want to get the names in my Jsp using <useBean\> tag..huv to do it...
Help pls
Thanks priya
 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ page language="java" import="foo.SearchBean" %>
...
<jsp:useBean id="searchResults" scope="request" type="foo.SearchBean"/>
...
[ August 27, 2003: Message edited by: Tiago Fernandez ]
 
Nischal Tanna
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suppose ur method name is display() in the java bean class which returns the ResultSet .Then in the jsp create the object of this java bean class by using <jsp:useBean id="obj" scope="session" class="classname"/> .then execute the respective method may be by this syntax
<%=obj.display()%>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!