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
How is the get () method different from the post() method?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
Which event is fired at the time of setting, getting or removing attribute from application scope?
Write a program to show the functionality of servlets.
What is lazy loading and what is Generic Servlet Class?
What are the types of protocols supported by httpservlet ?
What is the difference between Server and Container?
How can the session in servlet can be destroyed?
What are the advantages of servlets over traditional cgi?
Can you explain in detail 'javax.servlet' package?
What do you mean by request dispatcher in servlet? Also explain its methods.
What is a servlet context object?
What is the functionality of actionservlet and requestprocessor?
Which are the different ways you can communicate between servlets?
What are Servlets?