数据库表发生更改时更新FrontEnd [英] Updating FrontEnd when there is a Change in Database Table
问题描述
我正在使用JSP,Servlet和MySQL作为数据库来开发应用程序.
I am developing a Application using JSP , Servlets and MySQL as Database .
FrontEnd由DOJO库JavaScript和JSP组成,它显示数据库表中存在的所有元素.
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 immediately reflect in the Front End .
这不是定期刷新,可能会在1小时2小时甚至5小时后的任何时间发生
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 ??
推荐答案
以下是一些在jsp中显示Ajax演示的链接:
Here are some links that shows demo of Ajax in jsp:
- ajaxprojects
- ajax-programming-with-jsp-and-servlets
- w3schools Ajax
- roseindia Ajax
希望这会有所帮助.
这篇关于数据库表发生更改时更新FrontEnd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!