aspose file tools*
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets" Watch "servlets" New topic
Author

servlets

vasanthrao kumarbabu
Greenhorn

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
Sheriff

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: servlets
 
Similar Threads
why we not override method of HttpServlet
Why HttpServlet is abstract ?
Abstract class
Regarding abstract class
collection Framework