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

What are the servlet events?

1120


What are common tasks performed by Servlet Container?

1315


What is the difference between jsp and servlet life cycle?

1284


Define servlet mapping?

1221


What exactly is a servlet?

1065


What is lazy loading and what is Generic Servlet Class?

1127


What is the use of send redirect () method?

1148


What are the annotations used in servlet 3?

1081


How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255

3447


What is servlet mapping?

1079


What is cookie in servlet?

1117


What do you mean by scope object and what are its types?

1124


Is servlet thread safe?

1041


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

1074


Can you explain in detail 'javax.servlet' package?

1041