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
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
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
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.


Ping & DNS - my free Android networking tools app
Ajit Shanbhag
Greenhorn

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