I think if you were more specific about your exact problem you might
get a little more assistance. At any rate, below are a couple of code
snipets. I use a servlet to perform the query and pass the result set
to a JSP. I think the following will at least give you a very good
start.
In the servlet . . . .
rs = stmt.executeQuery( sql );
while (rs.next( ) ){
Vector vector = new Vector();
vector.add(new Integer(rs.getInt("var1")));
vector.add(new Integer(rs.getInt("var2")));
vector.add(rs.getString("var3"));
vector.add(rs.getString("var1"));
hashtable.put(rs.getString("var1"),vector);
session.setAttribute("Name the hashtable", hashtable);
then in the JSP . . . .
<%
Enumeration enum=null;
Hashtable ht = new Hashtable();
Vector vec = new Vector();
try{
ht =(Hashtable) session.getAttribute("Hashtable
Name");
enum = ht.keys();
int i=0;
}catch(Exception e){System.out.println(e.toString());}
%>
<%
while(enum.hasMoreElements()){
vec = (Vector) ht.get(enum.nextElement());
%>
<table>
<tr>
<td><%=vec.get(0).toString()%></td>
<td><%=vec.get(1).toString()%></td>
<td><%=vec.get(2).toString()%></td>
</tr>
<%
}
%>
----- Original Message -----
From: "Mukka, Srikanth" <[EMAIL PROTECTED]>
Date: Thursday, October 19, 2000 1:49 pm
> Hi Karau,
>
> I expect some one to give some input on how to handle this
> situation, as
> till now I worked with single record only.
> I think you got it.
>
> Bye
> Srikanth
>
> -----Original Message-----
> From: Karau, Joe [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 19, 2000 12:51 PM
> To: [EMAIL PROTECTED]
> Subject:
>
>
> So.. do you want someone on the list to write the JSP for you, or
> point you
> in the right diretion, or what?
>
> Joseph Karau
> Kingland Systems
> [EMAIL PROTECTED]
> 507-536-3629
>
>
> -----Original Message-----
> From: Mukka, Srikanth [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 19, 2000 2:27 PM
> To: [EMAIL PROTECTED]
> Subject:
>
>
> Hi All,
> I will accept a table name and want to display the all table data
> uisng JSP,
> after displaying I want to update or delete or insert data.
>
> Looking for your response.
>
> Bye
> Srikanth
>
> -----Original Message-----
> From: sonal bhasin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 19, 2000 11:30 AM
> To: [EMAIL PROTECTED]
> Subject:
>
>
> what is the difference between servlet and JSP
>
________________________________________________________________________
_
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
========================================================================
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> 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".
> 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".
> 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".
> 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".
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