jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets" Watch "servlets" New topic


vasanthrao kumarbabu

Joined: Jul 02, 2007
Posts: 1
hi , if we want to write any servlet this should be extends from HttpServlet it is an abstract class but in our class we are not implementing any methods. and we are not declaring our class as abstract why it is.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by vasanthrao kumarbabu:
we are not declaring our class as abstract why it is.

There are no methods in HTTPServlet class which are abstract.So no need to declare the class abstract which is extending the HTTPServlet class.

Rahul Bhattacharjee
LinkedIn - Blog
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

If you want your servlet to do something, you'll have to override at least one of the methods. Usually this is doPost, doGet, or both.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link: http://aspose.com/file-tools
subject: servlets
It's not a secret anymore!