aspose file tools
The moose likes Servlets and the fly likes HttpServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpServlet" Watch "HttpServlet" New topic
Author

HttpServlet

Ajit Shanbhag
Greenhorn

Joined: Oct 15, 2008
Posts: 7
Can anyone please tell me what is the specific reason for having HttpServlet as an abstract class without any abstract methods?


Ajit Shanbhag
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
Because -in order to be useful- at least one of its methods (generally doGet or doPost) needs to be overridden. Making HttpServlet abstract ensures that it can't be used directly - it needs to be subclassed in order to be instantiated.
Ajit Shanbhag
Greenhorn

Joined: Oct 15, 2008
Posts: 7
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpServlet