Automatically updating web page
So, how do you automatically update a Web page with dynamic elements?
Because actions such as adding or removing a book in the inventory leads the server-side data to change, you must monitor these actions.
Although you may be familiar with Java Swing applications such as "clock," in which data changes prompt GUI updates, or you might have read the implementation details of such applications in some basic Swing development guides, this approach will not work with my scenarios.
Swing already provides a mature way to automatically update the GUI based solely on the internal data status, but JSF does not have good support for refreshing the GUI based on a request from the server side.
B) Pushing Data with a js server Data can be push to the browser instead of pulling it.