This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
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.
 
wood burning stoves
 
subject: HttpServlet
 
Similar Threads
HttpServlet class
doConnect method
HttpServlet
HttpServlet
Generic Servlet,HttpServlet