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

How ThreadSafe page attribute will be working in Servlet as well as in JSP?Automatically ThresdSafe is true in JSP so service method will be destroy in each and every request or not?so how thresd will handle srevice method?

1 Answers   AZTEC,


Define declaration.

0 Answers  


What are the functions of Servlet container?

0 Answers  


Is there any need to shutdown the web server, if you want to modify a servlet?

3 Answers  


can u give some realtime example in ploymorphism? and inheritance?

11 Answers   SolutionNET,






Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!

0 Answers  


Explain the custom jsp tags and the beans.

0 Answers  


What are the types of an http request?

0 Answers  


What are all the protocols supported by httpservlet?

0 Answers  


Difference Between Web Server and Application server ??

4 Answers   PWC,


How do we call one servlet from another servlet?

0 Answers  


What is the workflow of a servlet?

0 Answers  


Categories