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

Answer Posted / yuvraj singh

SingleThreadModel is a marker interface. It is used to ensure that servlet handle only one request at a time.

Servlets can implement SingleThreadModel interface to inform the container that it should make sure that only one thread is executing the servlet’s service() method at any given moment.

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which HTTP method is non-idempotent?

624


Explain is servlet mapping?

592


How do I support both get and post from the same servlet?

708


How will you pass values from HTML page to the servlet?

560


What are some disadvantages of storing session state in cookies?

600






What is the disadvantage of cookies?

588


What are common tasks performed by Servlet Container?

776


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2538


What is servlet initializer?

514


How can we refresh automatically when new data has entered the database?

626


What are the new features added to servlet 2.5?

604


What is the difference between get and post methods?

608


What is the functionality of actionservlet and requestprocessor?

605


Why session tracking is needed?

593


What is the use of request dispatcher interface?

575