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 |
What is the inter-servlet communication?
Write a simple servlet program to print the contents of html.
What is dispatcher servlet?
How to upload a file to the server using servlet?
How do you run a servlet?
What is the purpose of inter-servlet communication?
What are the ways to handle multi-threading in servlets?
Explain the war file?
How is an application exception handling is done using a servlet?
What is the directory structure of web application?
How will two or three servlets interact or communicate with each other?
What is the difference between JspWriter and PrintWriter