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

How can a servlet refresh automatically if some new data has entered the database?

3 Answers   Citi Bank, CitiGroup, IBM, Satyam,


What is servlet context ?

4 Answers  


what is OOAS

2 Answers   iGate,


How can the referrer and the target urls be used in servlet?

0 Answers  


How do you invoke a servelt?

0 Answers  






Why is http protocol called as a stateless protocol?

0 Answers  


Define the servlet mapping.

0 Answers  


What is a servlet?

0 Answers  


Explain the custom jsp tags and the beans.

0 Answers  


What is the <load-on-startup> element?

0 Answers  


My Question is that i am using <image> tag in my servlet and after compilation after that calling by url in my browser then images are not showing. Sometime images are showing and sometime is not showing. I am using Tomcat to run my servlets. Tell me if there any specification for image in servlets or what is solution for this ??

2 Answers  


What is Client-Server Computing?

0 Answers   TCS,


Categories