Are Servlets by default thread safe or not?
thanks in advance
regards
Sudhakar
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
we cant Override Jsp Service method?Why?
4 Answers Infrasoft, Mind Tree,
what is EJB and Java servlet
How to upload a file to the server using servlet?
What is the difference between servlet and filter?
What is difference between get and post method?
What is a web application and what is it’s directory structure?
What are the steps that are involved in using the httpservlet class?
how to use servlets with j2ee ?
Describe in brief RequestDespatcher?
What are the objects involved when a servlet receives a call from client?
How can I share objects across different sessions?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?