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

Can we refresh servlet in client and server side automatically?

1058


How do I support both get and post from the same servlet?

1211


What is called Session Tracking?

1188


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2968


What are the important functions of filters?

1148


Which application server is best for java?

1071


Write a hello world program using servlets.

1063


What do you mean by deployment descriptor?

1059


What are the drawbacks of cgi?

1039


Explain the difference between get and post method in servlet?

1144


Explain servlet life cycle?

1133


What is servlet collaboration?

1143


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

966


Why is http protocol called as a stateless protocol?

1032


Explain the difference between generic servlet and http servlet?

999