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

Answer Posted / rajkumar

In Single Thread model multiple instances of Servlet class
is Created for every request and in MultiThread model thread
instance is created for every request.
Single thread model is used in case code safety.Performance
fo server is degraded when we use single thread as it
creates Servlet instance for every request where server
gives fast response in multi thread model.

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain request dispatcher and its methods.

595


What is the procedure of invoking different servlet in a different application?

570


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

598


What is servlet invoker?

604


Tell the new features added in servletrequest interface i.e. Servlet 2.4

583






What is a server side include (ssi)

577


How to make sure a servlet is loaded at the application startup?

562


What is servlet used for?

704


Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!

1843


Which application server is best for java?

565


How many servlet objects are created?

569


What is a servlet context object?

630


What are the advantages of cookies?

638


What is called Session Tracking?

608


Can we fetch the attributes related to a servlet on a different servlet?

650