Are Servlets by default thread safe or not?

thanks in advance
regards
Sudhakar

Answers were Sorted based on User's Feedback



Are Servlets by default thread safe or not? thanks in advance regards Sudhakar..

Answer / rv.nandakishore

No.

By default Servlets are not thread safe...Bcoz Servlet is
concept of Single instance multiple threads concept.
Multiple thread are acting on single object means its not
thread safe....

Is This Answer Correct ?    7 Yes 3 No

Are Servlets by default thread safe or not? thanks in advance regards Sudhakar..

Answer / nilofar

no by default servlets are not threads safe .oly particular
lines of service method can be synchronised to make it
thread safe

Is This Answer Correct ?    3 Yes 3 No

Are Servlets by default thread safe or not? thanks in advance regards Sudhakar..

Answer / naresh

Yes By Default Servlets Are ThreadSafe.....
If you use Insatance VAriables then only Servlets is having Thread Related Problems
Thats way dont recommended to use Instance VAriables in servlets...Its DAnagerous

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Servlets Interview Questions

What are the types of an http request?

0 Answers  


What are the advantages of servlets over traditional cgi?

0 Answers  


what do you understand by url rewriting?

0 Answers  


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

0 Answers  


Is servlet a server side scripting language?

0 Answers  






What is the use of java servlet api?

0 Answers  


How many ways to remove the session object in the container

6 Answers   Bosch,


What is the use of send redirect () method?

0 Answers  


How can you start a jta transaction from a servlet deployed on jboss?

0 Answers  


What is a Proxy Server?

1 Answers  


What is a java servlet?

0 Answers  


i have class files in class folder. but i have no java files. but i want to modify the java files which are related to class files . how ?

5 Answers   TCS,


Categories