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

Name the different ways of session tracking.

570


What is setattribute in servlet?

557


What are the types of servlets? Explain

676


How to get the actual path of servlet in server?

739


What if we pass negative value in load-on-startup?

805






What’s the difference between genericservlet and httpservlet?

533


How can the session in servlet can be destroyed?

712


How is an application exception handling is done using a servlet?

540


How do you design microservices?

625


What’s the difference between sendredirect and forward methods

565


What is the structure of the http response

677


What is meant by a servlet?

605


What is the use of httpservletrequestwrapper?

592


What is servlet collaboration?

664


What is url encoding and url decoding

589