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

Explain the difference between jsp and servlet?

1057


What are different methods of session management in servlets?

1268


Explain the concept of ssi ?

1057


Explain the methods of request dispatcher in servlet?

1033


What are the common methods that are included in the http servlet class?

1033


Differentiate between get and post?

1158


How do cookies work in servlets?

1040


What is servlet attributes and their scope?

1052


What do you mean by web applications? Explain web application directory arrangement?

952


Explain the role of dispatcherservlet and contextloaderlistener.

1180


What is cgi?

1011


How the typical servlet code look like ?

1218


What are the phases of a servlet life cycle?

1110


What is url encoding and url decoding

1144


What are the different ways we can maintain state between requests?

1089