Is Servlets thread-safe?

Service() method of servlet class is not synchronize then how will it work as thread-safe for every request at the same time?

Questions by Mukeshtop

Showing Answers 1 - 9 of 9 Answers

pradeep

  • Jan 19th, 2012
 

Servlets are not thread safe. If you want to make it Servlet as Thread safe, you can implement SingleThreadInterface

  Was this answer useful?  Yes

sujata waghmare

  • Jan 10th, 2014
 

servlets thread safe..servlet and jsp both are multithreaed thats why control the flow ...

  Was this answer useful?  Yes

vinay

  • Sep 16th, 2017
 

Above mentioned both (Servlet and JSP are multithreaed) so my question is (suppose if the thread deads in servlet it may not) then how can we say that multi-thread, can you explain if it occurs and how to handle.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions