public abstract class HttpServlet extends GenericServlet implements java.io.Serializable Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A subclass of HttpServlet must override at least one method, usually one of these: doGet, if the servlet supports HTTP GET requests doPost, for HTTP POST requests doPut, for HTTP PUT requests doDelete, for HTTP DELETE requests init and destroy, to manage resources that are held for the life of the servlet getServletInfo, which the servlet uses to provide information about itself
above quote is from javadoc... Why subclass of HttpServlet must implements any of these methods... ?? Ok..If it is abstract it must implements its abstract methods or declare the class as abstract.. am i right?? ...why any of thesee methods....??? If all methods doGET,doPost..etc are abstract.. then subclass must implement all methods... not any one....?? thanks in advance.. [ February 17, 2002: Message edited by: Suresh Babu Seeram ]
regards,<br />Suresh<br />Sr.Systems Engineer)<p>--Sun Certified Programmer for Java 2 Platform <br />--JLPT(Level-4) Certified Professional
I think the reason is, its just the class that has been declared as abstract. None of the methods are declared as abstract. I think all methods have an empty body. So no need to override all the methods. Hope this helps!
- Raj (SCJP, SCWCD, SCEA-I, SCBCD, IBM XML, IBM 483)