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 |
Explain the different ways for servlet authentication?
What is the difference between the include() and forward() methods?
What is a parser. What does a parser do with a XML? Why do we need it?
What is difference between cookies and httpsession?
What are different types of SessionTracking?
What exception should be thrown when servlet is not properly initialized?
Explain the lifecycle of a servlet?
Why servlet is used as controller ? Not JSP? I want complete explation?
What is a cookie What is the difference between session and cookie
What is httpservlet class?
Is it good idea to create servlet constructor?
What is the role of the webserver?