This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

appending dynamic data in the jsp

 
yugi reddy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i am beginner to java,
My requirement is i need to scan the database changes every second and need to show the changesin the jsp,
I have started to write progrmme as below......My major problem was the data was not appending to the jsp but after exiting the while loop it shows all the results at once

the code is
<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.project.scanchanges.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>EDUSOL</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>

<%


while(true){
try{
ScanTags s=new ScanTags();
NameBean n=s.ReadTags(false);
if(n==null){
continue;
}

out.println(n.getName()+" has Checked "+n.getMode());
}
catch(Exception e){
out.println("Exceptioni n getting values");
e.printStackTrace();
break;
}
}

%>
</body>
</html>

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic