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
Is that servlet is pure java object or not?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>
What are the disadvantages of storing session state in cookies?
What is a generic servlet?
Why is a constructor needed in a servlet even if we use the init method?
Why are http servlets used in programming?
What are different ways for authentication of servlet?
What is the structure of the http response
What do you mean by cgi?
What is meant by a servlet?
Explain Action Servlet?
List out difference between a JavaBean from a Servlet?
What's the advantages using servlets than using cgi?
Describe in brief RequestDespatcher?
How to handle exceptions thrown by application with another servlet?