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

Difference between doget and dopost?

690


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

587


What are the life cycle methods of a servlet?

603


Why is Servlet so popular?

618


What is called Scriptlet?

569






How we can get ip address of client in servlet?

550


how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file

2094


Why do we have servlet listeners?

613


Why filter is used in servlet?

534


Is it possible to have a constructor inside the servlet?

560


Explain jsessionid and when is it created?

604


How to read request headers from servlets?

570


What is cgi and what are its drawbacks?

560


What is the use of servletconfig interface?

564


Which are the different ways you can communicate between servlets?

536