I am using a servlet, in that servlet I used a doPost() method by
extending the HttpServlet. then who implement the all remaining methods( doGet,doPut,doHead,doOptions.......)

Would you be more specific in what you try to do or what you trying to say? I do not understand what you asking...

I am trying to understand the servlets concepts.
Httpservlet is an abstract class then our servlet need to implement to all the methods in that Httpservlet na?

No, Servlet is an abstract class, HttpServlet is not. It already has the generic implementations of the methods which the user is free to override.

No, Servlet is an abstract class, HttpServlet is not. It already has the generic implementations of the methods which the user is free to override.

r u sure? i am sure that Httpservlet and GenericServlet s are both abstract classes.by verifying kathey sierra book.

Yes, I am sorry, I got the facts wrong there. HttpServlet indeed is abstract class but the functions still have their own generic implementation. A class being abstract doesn't mean we _must_ override the functions. Such a requirement is imposed only if the functions themselves are abstract which I don't think they are. Read this.

Although (at least according to the "normal" rules for class extension) it will compile just fine without overriding any of them (AFAIK, I haven't actually tried it), it just wouldn't do anything other than return the http error message that the requested http service/method is not supported/implemented.

This article has been dead for over six months. Start a new discussion instead.