In many mock exams,I have seen questions where it is asked if MyServlet is thread safe? Some of them provide answer as yes and some as no.
I think answer is no because container might create multiple instance of the servlet and hence it cannot be thread safe(a particular instance of the servlet is thread safe but not the servlet itslef), am I right?
It depends on what the mock considers as not being thread safe. Servlet instance members ? HttpSession ? ... the answer(yes/no) will depend on what the mock is asking. Note that the SingleThreadModel is deprecated, and is not asked at the exam.