| Author |
From servlet, to Bean to JSP
|
Shuaib Gill
Ranch Hand
Joined: May 29, 2001
Posts: 62
|
|
Hi, Suppose I have opened a db connection , executed and SQL query and I have 3 fields. Now suppose I want to put the values of these 3 fields into a Java Bean (not EJB). From there I want to put the values of the database query on the JSP page. How can this be done? Thanks in advance,
|
programmer77
|
 |
Vlad Patryshev
Ranch Hand
Joined: Jun 30, 2001
Posts: 61
|
|
|
You have a resultset; get the column values then. Set the bean attributes to the values you have: myBean.setAttributeNumber1(theValue). Retrieve the bean attributes and place them to the page, like this: <%= myBean.getAttributeNumber1() %>
|
Thanks,<br />Vlad
|
 |
 |
|
|
subject: From servlet, to Bean to JSP
|
|
|