jQuery in Action, 2nd edition*
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

Gaia Nathan
Ranch Hand

Joined: Aug 01, 2001
Posts: 62
Hi All,
I've been wondering for some time as to why the HttpServlet class in the javax.servlet.http package is declared abstract.
As far as I can see, it does not contain any abstract methods and has implemented the abstract "service" method in the GenericServlet class.
Can someone enlighten me on this? Thank you in advance.
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
A class can have no abstract methods and still be declared abstract. It just means that the class was meant to be subclassed and not instatiated directly. This is the case for HttpServlet.


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
Gaia Nathan
Ranch Hand

Joined: Aug 01, 2001
Posts: 62
Thank you Rick for that answer. I can sleep better now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpServlet