wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Http Servlet as runnable object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Http Servlet as runnable object" Watch "Http Servlet as runnable object" New topic
Author

Http Servlet as runnable object

Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Can I make my Http Servlet as runnable object

Example

public class ServerStarted extends HttpServlet implements Runnable


SCJP 5 |SCWCD 5| Started thinking about Web Services ?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I guess you can, but does it make sense ?


[My Blog]
All roads lead to JavaRanch
Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Thanks Christophe Verre ,

Why it doesn't make sense..
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Even if you make a run() method, the container is not going to make use of it, isn't it ?
Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Got it Thanks Christophe Verre.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Http Servlet as runnable object