How can a servlet refresh automatically if some new data
has entered the database?
Answer Posted / 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 |
Post New Answer View All Answers
Which are the different ways you can communicate between servlets?
How do you configure a centralized error handler in servlets?
What is Servlets and explain the advantages of Servlet life cycle?
How do servlets work?
How does tomcat servlet container work?
How can we upload the file to the server using servlet?
Differentiate between the get and post method
Name the different ways of session tracking.
What is meant by session? Tell me something about httpsession class?
What are the phases of servlet life cycle?
What is servlet instance?
Can you refresh servlet in client and server-side automatically?
How do you deal property files in servlet?
Whether we can get deadlock situation in servlets?
Explain the differences between jsp and servlet.