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 to make servlet thread safe?

Answer Posted / shakir khan

There are situations where we want to protect your servlet
member variables from being modified by different
clients.In this case you can have your servlet by
implementing the marker interface SigleThreadModel.

Everytime a client makes request to a servlet by
implementing this interface,servlet engine will create a
new instance of servlet.

For performance reason,servlet engine can also maintain a
instance pool,handing out instances as they are needed.Or
it could also serialize client request executing one after
another.

Is This Answer Correct ?    49 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the phases of servlet lifecycle?

1066


Should I override the service() method?

1088


What do you mean by the servlet chaining?

1076


What is the capacity the doget can send to the server?

1075


Why is Servlet so popular?

1066


Define declaration.

1064


What’s the difference between sendredirect and forward methods

1058


What is the requirement of servlet config and servlet context implemented and how are they implemented?

997


What is the difference between genericservlet and httpservlet

1081


What is servlet lazy loading?

1162


What is meant by session? Tell me something about httpsession class?

1010


What is the major difference between servlet and applet?

997


Explain the role of dispatcherservlet and contextloaderlistener.

1184


What is the need of session tracking in web application?

1028


How do you communicate in between Applets and Servlets?

1061