Is Servlet Class Thread safe?????? How to make servlet
Thread safe ???

Answer Posted / samba

NO.
Servlet is not thread safe.it allows to access more than one
thread at a time.IF we want to make servlet as a thread safe
then make service method is synchronized or implement
SingleThreadModel interface.There is no methods in this
interface.

Is This Answer Correct ?    21 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between sendredirect() and forward() in a servlet?

722


Difference between java beans & servlets?

768


What are different ways for authentication of servlet?

722


What is the process for chaining servlet?

786


Why is a constructor needed in a servlet even if we use the init method?

798


What is the importance of init() method in Servlet ?

800


What are the different types of servlets?

727


Explain get and post.

854


What’s the use of the servlet wrapper classes??

832


How can we create deadlock situation in servlet?

1058


Which interface should be implemented by all servlets?

920


What do you mean by cgi in servlet?

803


I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

2447


When servlet object is created?

797


What are the various ways of session supervision in servlets?

736