DWR might be another choice.
Main Topics
Browse All Topicshi experts
i m getting data from mysql database in jsp page. i m creating connection from simple java class and after connected to database i m calling a method which returns Resultset like
public ResultSet list()
{
return rs;
}
and on Jsp page i calling rs and getting all columns data in table form
like
<table border="0" cellpadding="1" cellspacing="0" id="myTable" class="tablesorter">
<tr>
<th width="1%"></th>
<th><span class="style11"> Name
<th ><span class="style11"> City
<th ><span class="style11"> Addr
<th width="3%"></th>
</tr>
<tbody id="mmm">
<%
try {
while (rs.next())
{
%>
<tr style="height:22px;" id="ref">
<tdr"> <%= rs.getString("Name")%></td
<td "> <%= rs.getString("City")%></td
<td "> <%= rs.getString("Address")%><
<div>
</div>
</tr>
<%
}
} catch (Exception ex) {
ex.printStackTrace();
}
%>
</table>
i successfully getting this but my problem is :: i want to get all this and more new column data every 40 or 50 seconds without reloading or refresh jsp page..
please tell me how to do this ?
thanks in advance..
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: shalomcPosted on 2009-09-06 at 00:02:24ID: 25268965
you need to change your architecture a bit to use AJAX.
you will have 2 jsp programs:
1. resultset.jsp that does the database access, and outputs the result set either as a formatted table of results, XML, or JSON.
2. main.jsp that is used to send javascript to the client. The javascript then initiates an AJAX call to resultset.jsp, in a loop, so the data is refreshed.
ShalomC