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


Please Help Members By Posting Answers For Below Questions

What do you mean by cgi?

529


What is servlet instance?

538


What is pure servlet?

691


What is api in servlet?

518


What is dispatcher servlet?

550






What is Client-Server Computing?

1889


Write a hello world program using servlets.

584


What do you mean by singlethreadmodel interface?

576


What is servlet and list its types?

536


Should I override the service() method?

662


Explain the architechure of a servlet?

596


What is the procedure for initializing a servlet?

542


Explain the working of service() method of a servlet.

497


What is called a session?

617


explain the advantages of servlet life cycle?

551