开发者

Updating FrontEnd when there is a Change in Database Table

开发者 https://www.devze.com 2023-02-21 15:19 出处:网络
I am developing a Application using JSP , Servlets and MySQL as Database . The FrontEnd is made of DOJO library JavaScript and JSP and it displays all the Elements Present in the Database Table .

I am developing a Application using JSP , Servlets and MySQL as Database .

The FrontEnd is made of DOJO library JavaScript and JSP and it displays all the Elements Present in the Database Table .

One of our requirement is that whenever there is a change ( A New Entry that is added in the Table) , it should immed开发者_StackOverflow中文版iately reflect in the Front End .

This is not a Periodical refresh ,and it may happen at anytime like after 1 Hour 2 Hours or even after 5 Hours )

Please sugget what is the best approach to deal with this requirement ??


Actually you still need to periodically check if your db changes or not, then you can update your pages. To update it without user refreshing, try AJAX and polling.

For more details pls visit here.


Here are some links that shows demo of Ajax in jsp:

  1. ajaxprojects
  2. ajax-programming-with-jsp-and-servlets
  3. w3schools Ajax
  4. roseindia Ajax

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号