Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 is the difference between encodeRedirectUrl and encodeURL?

1166


What is the life-cycle of servlets?

1182


What is servlet interface?

1275


What is the workflow of a servlet?

1225


What is a web application and what is it’s directory structure?

1126


What is difference between server and servlet?

1139


Why is http protocol called as a stateless protocol?

1081


Difference between get and post in java servlets?

1077


Explain the jar and war files in servlet?

1152


The code in a finally clause will never fail to execute, right?

1148


What is the disadvantage of cookies?

1035


what do you understand by url rewriting?

1006


How httpservlet is different from the genericservlet?

1183


Difference between forward() method and sendredirect() method ?

1087


What exactly is a servlet?

1063