What is Single Threaded Model in Servlets? Explain this
with an example?

Answer Posted / niranjanravi

Single Thread Model ensures that servlet handles only one
request at a time.When YOUR CLASS IMPLEMENTS THIS INTERFACE
WE ARE GUARENTEED THAT no two threads run simultaneously in
service() method.
this is a marker interface which contains no methods on its
own.

Is This Answer Correct ?    53 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use threads in Servlets?

636


What is getservletcontext?

542


How do you configure a centralized error handler in servlets?

523


How servlets are deployed in java?

534


What is meant by Servlet? What are the parameters of service method?

579






What is the process to implement doget and dopost methods?

536


Who is responsible for writing a constructor?

764


How can we implement a jsp page?

615


What does the term localization refer to?

574


What do you mean by annotations in servlet?

574


What are the steps that are involved in using the httpservlet class?

561


What is Client-Server Computing?

1885


Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

755


Can we use the constructor, instead of init(), to initialize servlet?

572


Which interface must be implemented by all servlets?

779