How to make servlet thread safe?

Answer Posted / monkyspiderpig

The only thing you need to do is to define only static
variables at Class level. When a method is called each
thread gets a new variable.

Is This Answer Correct ?    8 Yes 41 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain servlet events?

560


What are sessions in servlets?

573


Is it good idea to create servlet constructor?

738


Why do we have servlet listeners?

597


How can we invoke another servlet in a different application?

704






What is the default http method in the servlet?

760


Name the packages that work with servlet?

543


Is that servlet is pure java object or not?

639


What are the phases of a servlet life cycle?

617


What is the difference between genericservlet and httpservlet

584


How can we implement a jsp page?

625


Describe some assignments that are executed by servlet container?

579


How can a servlet be used to generate plain text instead of html?

543


What are the steps that are involved in using the httpservlet class?

572


What are the types of Session Tracking ?

646