top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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

+1 vote
245 views
How can the data within an HTML form be refreshed automatically whenever there is a change in the database?
posted Nov 30, 2015 by Shyam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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.

answer Dec 8, 2015 by Karthick.c
...