Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Why is HttpServlet declared abstract?

The HttpServlet class is declared abstract because the default implementations of the main service methods do nothing and must be overridden. This is a convenience implementation of the Servlet interface, which means that developers do not need to implement all service methods. If your servlet is required to handle doGet() requests for example, there is no need to write a doPost() method too.
Related Posts Plugin for WordPress, Blogger...
Flag Counter