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 / tulasi vani

There are two different ways of making a servlet thread
safe namely

1.By implementing SingleThreadModel.

By implementing a SingleThreadModel it will be possible to
create a Thread safe servlet.There can only be one user at
a given point of time.

2.Synchornize the part of sensitive code.

We can allow a single user at a given point of time by
making that part of the code which is sensitive as
synchronized.

Is This Answer Correct ?    127 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the important functions of filters?

1203


What is war file?

1173


What exactly are the functions of servlet?

1161


Can we refresh servlet in client and server side automatically?

1110


Whether we can get deadlock situation in servlets?

1122


Tell the new features added in servletrequest interface i.e. Servlet 2.4

1227


Is servlet thread safe?

1043


How printwriter is different from servletoutputstream?

1068


What do you mean by filter in servlet?

1066


How to commuincate between an applet and a servlet?

1102


What do you mean by the servlet chaining?

1148


If my browser does not support cookie, and my server sends a cookie instance what will happen?

1145


How do you load an image in a Servlet?

1236


What do you mean by annotations in servlet?

1106


How native code can be used in a servlet?

4121