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

Why is init() method is used in servlets?

957


How to commuincate between an applet and a servlet?

986


How can we achieve transport layer security for our web application?

967


Which protocol will be used by browser and servlet to communicate

989


What is the use of java servlet api?

975


What are the steps that are required to handle the multi-threading?

1044


What is the use of httpservletresponsewrapper?

911


Explain servlet.

994


Explain the difference between generic servlet and http servlet?

941


How to make sure a servlet is loaded at the application startup?

987


What do you mean by httpservlet and how it is different from the genericservlet?

988


How are filters?

993


What do you mean by deployment descriptor?

960


how many jsp scripting elements are there and what are those?

966


Write the code to get the server information in servlet.

981