I am showing a JSP page , on its onload Method i am getting the Data from Database and showing it .
The data might change continously inside Databse , Now my requirement is ,when ever there is a change inside Database data on to that particular table , i need to show that Latest data in my JSP page also .
Means , whenever there is a change in Database , i need to referesh the JSP Page to show these latest values .
Is there any reason you don't do what I imagine most stock exchange type sites do which is to reload the data at certain time intervals (every 5s, 60s or whatever) using ajax?
You do not need to monitor database at all. AJAX will allow you to make database request over a certain period of time allowing you to reload only the part of page which is dependent on changing daabase values without actually reloading the entire page.
" whenever there is a change in Database , i need to referesh the JSP Page to show these latest values . "
but i dont want it to periodically refreshing .
Thank you all for your help , really i was being some modest with the replies from all of you .
actually i wanted the below thing
Is there any way , we can call a Servlet or a JSP from a Databse trigger .
Ravi Kiran Pattu wrote:Is there any way , we can call a Servlet or a JSP from a Databse trigger .
And what would you do with this servlet or JSP if you could call it?
Think about it, I'm sitting looking at your page, my browser has html, it knows absolutely nothing about JSP or servlets, there is no connection between your sever and my browser once the page has been loaded until another request is sent to the server.
my browser has html, it knows absolutely nothing about JSP or servlets, there is no connection between your sever and my browser once the page has been loaded until another request is sent to the server.
I agree with you Sean , this was a good point .
I agree perodical refresh is the only solution . Thank you all of you .