Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet implict implementation  RSS feed

 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Thanks in advance.
Servlet is an interface and by deafult it is a multi threaded one.But how they have implemented this.is it by using interface Runnable or class Thread.
I have seen the tomcat document, they just given Servlet without any thing like runnable or thread.

Please tell me.
Regards
Sree
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can probably look into the Tomcat's Source distribution.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The threads are created somewhere else within the container.
In the case of Tomcat, they are created in whichever connector you're using.

The servlet itself doesn't need any threading code it just has to be there so that the container can call its service method.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!