File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multithreading in Servlets

 
ragi singh
Ranch Hand
Posts: 198
Oracle Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,


I would like to know if servlet supports multithreading as the STM(Single Thread Model ) supports multithreading ?
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly what is your question?? In STM one instance of a servlet serves only one request at a time. To serve multiple requests at the same time, the server creates multiple instances of the same servlet. STM is deprecated now. A normal servlet can serve multiple requests at the same time. The server creates a new thread for a request and calls the doGet or doPost method of our servlet through that thread...
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Single Thread Model is deprecated. All it does is to make a servlet treat a request one at a time, but it doesn't prevent other concurrency issues.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic