How to make servlet thread safe?

Answer Posted / surjit

We can make a servlet thread by implementing the SingleThreadModel interface.
i.e
Public class EmployeeTest extends HttpServlet implement SingleThreadModel{

Service(){
write yor code..........
}

}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who is responsible for writing a constructor?

777


What are the type of protocols used in httpservlet?

612


What is Servlets and explain the advantages of Servlet life cycle?

579


how many jsp scripting elements are there and what are those?

542


What is the capacity the doget can send to the server?

569






Is tomcat a servlet container?

573


What's the architecture of a servlet package?

556


What exactly are the functions of servlet?

597


Explain get and post.

649


What is called Session Tracking?

596


Can we use threads in Servlets?

651


How can the session in servlet be destroyed?

639


What is the difference between 2 types of servlets?

642


What do you mean by request dispatcher in servlet?

610


What are the exceptions thrown by servlets? Why?

622