----- Original Message -----
From: "kishore" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 8:24 PM
Subject: Re: Fetching Data from Bean


> try this way ...
>
> <table>
> <tr > <!-- // let  name and address in tabular form  -->
> <td> name </td>
> <td> address</td>
> </tr>
> <%
> try {
> //
>  Connection c =
DriverManager.getConnection("jdbc:odbc:TABLE","usr","pwd");
>  Statement s = c.createStatement();
>  ResultSet r = s.executeQuery("select name , address  from usertable
where
> username = '"+loginBean.getUsername()+"'");
>         while( r.next())
>
>
> %>
> <tr>
> <td> <%= r.getString("name") %> </td>
> <td> <%= r.getString("address") %> </td>
> <tr>
> <%
>           }
>         r.close();
>        s.close();
>
>    }catch(SQLException e){
>           System.out.println("SQLException thrown @ xyz.jso");
>         }catch(ClassNotFoundException ee){
>           System.out.println("sun.jdbc.odbc.JdbcOdbcDriver class not fount
> 2 xyz.jsp ");
>          }
> %>
> </table>
> ----- Original Message -----
> From: Puneet Kathuria, Gurgaon <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 19, 2001 9:58 PM
> Subject: Fetching Data from Bean
>
>
> > Hello All:
> >
> > I have a jsp page that displays data in tabular format.
> > I have written a bean that performs the database queries & creates a
long
> > string (html) and it's returned back to display on the page.
> >
> > Can i bring the whole resultset in any form to jsp page & then display
> > (maybe as arrays)
> >
> > Any suggestions as to how / in what form to bring data to jsp page apart
> > from the strategy am following ?
> >
> > regards
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to