
I have a resultset and I need to collect the resultset values into the arraylist into a table.
arraylist also contains timestamp values.
Please help me in this
regards Thanks in advance

JSP Display values of ResultSet to HTML table:
<%@page import="java.sql.*"%>
<table border=1>
<tr><th>Name</th><th>Address</th></tr>
<%
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from data");
while(rs.next()){
%>
<tr><td><%=rs.getString("name")%></td><td><%=rs.getString("address")%></td></tr>
<%
}
rs.close();
st.close();
con.close();
}
catch(Exception e){}
%>
</table>

i have a senario where i have a combo box which has certain departments.. and when the user selects an option.. then the relevatn doctors belonging to that department should be displayed.. cuz for the one above.. it displays only one value.. i want all the values to be displayed... plz
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.