How can a servlet refresh automatically if some new data
has entered the database?
Answers were Sorted based on User's Feedback
Answer / vikas kapoor
Well you can use
response.setHeader("Refresh",5);
This will update the browser after every 5 seconds
response.setHeader("Refresh","5",
URL="http://localhost:8080/myServlet/MyRequest.do
This will refresh MyRequest.do after 5 seconds
Is This Answer Correct ? | 28 Yes | 0 No |
Answer / guest
You can use a client-side Refresh or Server Push.
Is This Answer Correct ? | 11 Yes | 4 No |
Answer / rajesh r
Automatic Database synchronization is not possible in
SERVLETS
we need to code for that manually..
In EJB entity Bean CMP , db sync in possible.
Thanks
Rajesh
Rajeshr1988@gmail.com
Is This Answer Correct ? | 4 Yes | 0 No |
What do you mean by annotations in servlet?
What is meant by a web application
Write all the phases defined in servlet life cycle?
What are the life cycle methods of the servlet?
can i call init() method in destroy() method of servlset. ?
In servlets, Why do we need both GET and POST method implementations?
How variables can be accessed across the sessions?
What exactly is a servlet?
What exception should be thrown when servlet is not properly initialized?
Whats the advantages using servlets over using CGI?
What is servlet container. how it works?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?