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 is a cookie What is the difference between session and cookie

0 Answers  


What is Single Threaded Model in Servlets? Explain this with an example?

10 Answers   Wipro,


What is the difference between jsp and servlet life cycle?

0 Answers  


Can we refresh servlet in client and server side automatically?

0 Answers  


what is servlet and what you get when we use servlets?

7 Answers   GGK Tech, Satyam,






Define servlet mapping?

0 Answers  


what is servlet life cycle?

3 Answers   Inforica,


What are the new features added to servlet 2.5?

0 Answers  


What happens, if server sends a cookie to a browser that doesn't supports cookies?

2 Answers  


What is context in servlet?

0 Answers  


What is the purpose of requestdispatcher interface?

0 Answers  


Explain jsessionid and when is it created?

0 Answers  


Categories