How can the data within an HTML form be refreshed automatically whenever there is a change in the database?

David Garcia

JSP is intended for dynamically generating pages. The generated pages can include wml, html, dhtml or whatever you want...

When you have a generated page, JSP has already made its work. From this moment you have a page.

If you want automatic refreshing, then this should be acomplished by the technology included in the generated page (JSP will tell only what to include in the page).

The browser can not be loaded by extern factors. The browser is the one who fetches url's since the http protocol is request-response based. If a server can reload a browser without its allow, it implies that we could be receiving pages which we haven't asked for from servers.

May you could use applets and a ServerSocket for receiving incoming signals from the server for changed data in the DB. This way you can load new information inside the applet or try to force a page reload.

[That's a nice idea -- it could use the showDocument() call to reload the current page. It could also use HTTP polling instead of maintaining an expensive socket connection. -Alex]

Perhaps (if possible), could be simpler using an automatic JavaScript refreshing function that force page reload after a specified time interval.

[Search the FAQ on "redirect" for more information on this technique. -Alex]

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact