wood burning stoves*
The moose likes JSP and the fly likes appending dynamic data in the jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "appending dynamic data in the jsp" Watch "appending dynamic data in the jsp" New topic
Author

appending dynamic data in the jsp

yugi reddy
Greenhorn

Joined: Aug 20, 2010
Posts: 3
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

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: appending dynamic data in the jsp
 
Similar Threads
http error404
I got http-500 error in servlet and jsp.how to find error?
Session tracking with URL rewriting
problem inserting data into MS Access
Request Attribute confusion