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

Answer Posted / rajesh r

Hi

The SingleThreadedModel has been deprecated from Servlet
specification due to a performace hit.

Please donot use this in future use Synchronized block if
you really need to protect your Attributes from cuncurrent
access.

Thanks
Rajesh
rajeshr1988@gmail.com

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If a servlet is not properly initialized, what exception may be thrown?

617


Explain the difference between get and post method in servlet?

590


What are the difference between RMI and Servlets?

1038


How can we include static files in the jsp page?

597


What are session variable in servlets?

552






What is url encoding and url decoding

576


Explain servlet life cycle?

603


What is getservletcontext?

542


Explain the difference between servlet and cgi?

594


How can you use a servlet to generate a plain text instead of html?

574


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!

1821


What is the difference between get and post methods?

587


What is the purpose of requestdispatcher interface?

603


Explain in brief the directory structure of a web application?

558


When to use doget() and when dopost()?

617