How can a servlet refresh automatically if some new data
has entered the database?

Answers were Sorted based on User's Feedback



How can a servlet refresh automatically if some new data has entered the database?..

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

How can a servlet refresh automatically if some new data has entered the database?..

Answer / guest

You can use a client-side Refresh or Server Push.

Is This Answer Correct ?    11 Yes 4 No

How can a servlet refresh automatically if some new data has entered the database?..

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

Post New Answer

More Servlets Interview Questions

What do you mean by annotations in servlet?

0 Answers  


What is meant by a web application

0 Answers  


Write all the phases defined in servlet life cycle?

0 Answers  


What are the life cycle methods of the servlet?

0 Answers  


can i call init() method in destroy() method of servlset. ?

5 Answers   IBM,


In servlets, Why do we need both GET and POST method implementations?

3 Answers   IBM,


How variables can be accessed across the sessions?

3 Answers  


What exactly is a servlet?

0 Answers  


What exception should be thrown when servlet is not properly initialized?

0 Answers  


Whats the advantages using servlets over using CGI?

0 Answers  


What is servlet container. how it works?

0 Answers  


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?

0 Answers  


Categories