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 differences between the servletconfig interface and the servletcontext interface?

1194


What is life cycle of Servlet?

1079


List some life cycle methods of a servlet.

1072


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

1106


What is string tokenizer?

1088


Differentiate between the get and post method

1073


What is URL Encoding?

1190


Write a command to get actual path of a servlet to the server?

1036


How do you get the ip address of the client in servlet?

1016


What are the types of protocols supported by httpservlet ?

1229


Why do we need a constructor in a servlet if we use the init method?

1055


What if we pass negative value in load-on-startup?

1284


Explain Action Servlet?

1095


Is tomcat a servlet container?

1054


What is the use of send redirect () method?

1094