What is Single Threaded Model in Servlets? Explain this
with an example?
Answer Posted / devarathnam
Hi... Actually "SingleThreadedModel" is a marker
interface,which doesnot contain any methods.By default
servlet is multithreaded.If u want to make this as single
theaded u can implement this interface in the following
fashion.
public class SingleThreadedTest implements SingleThreadModel
{
//some code
//....
//....
//....
}It is Thread-safety mechanism on a shared resource.
Is This Answer Correct ? | 28 Yes | 7 No |
Post New Answer View All Answers
Which event is fired at the time of setting, getting or removing attribute from application scope?
What is difference between cookies and httpsession?
What are life cycle methods of a servlet?
Explain servlet life cycle?
Explain how does JSP handle run-time exceptions?
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
What do you mean by web applications?
What are different Authentication options available in Servlets.
What is the purpose of requestdispatcher interface?
How many objects of a servlet is created?
What are the important functions of filters?
How can we upload the file to the server using servlet?
How to get the current httpsession object?
Difference between GET and POST?
What do you mean by annotations in servlet?