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 / sanjay

to make servlet as threas safe we have three approaches
1.do not instance variables into our servlet we use only
local variables
2.by using synchronized methods
3.synchronized blocks
above three ways synchronized blocks is the best way

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the supporting protocol by HttpServlet ?

1202


How we can get ip address of client in servlet?

991


What’s the difference between genericservlet and httpservlet?

1122


How the JSP file will be executed on the Server side?

1144


What is servlet collaboration?

1150


Why is http protocol called as a stateless protocol?

1041


What do you mean by filter in servlet?

1015


What are the uses of servlet

1183


What is the GenericServlet class?

1237


Where do you define dispatcherservlet?

1055


What are the different ways we can maintain state between requests?

1101


Explain the differences between jsp and servlet.

1007


How a servlet is unloaded?

1094


Explain jsessionid?

1044


List out the difference between ServletConfig and ServletContext?

1050