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
Explain request dispatcher and its methods.
What is the procedure of invoking different servlet in a different application?
What is the importance of init() method in Servlet ?
What is servlet invoker?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
What is a server side include (ssi)
How to make sure a servlet is loaded at the application startup?
What is servlet used for?
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!
Which application server is best for java?
How many servlet objects are created?
What is a servlet context object?
What are the advantages of cookies?
What is called Session Tracking?
Can we fetch the attributes related to a servlet on a different servlet?