Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain the differences between jsp and servlet.

1048


Why do we have servlet listeners?

1128


Explain the difference between servlet and cgi?

1215


How do you run a servlet?

1108


What are the important functions of filters?

1201


Can we use threads in Servlets?

1192


Define context initialization parameters.

1094


What is the use of java servlet api?

1089


When servlet is loaded?

1122


What are the differences between forward() method and sendredirect() methods?

1080


What is the use of request dispatcher interface?

1055


How can the session in servlet be destroyed?

1210


What is the disadvantage of cookies?

1035


What is servlet collaboration?

1191


Write a program to show the functionality of doget and dopost method?

1260