1)Why GenericServlet is declaed as abstact as it has no single method as abstract?
Becuase it's not meant to be used directly. The intent is for it to be extended.
2)How does the rule applied on httpServlet class as what all classes extends this class must
implement atleast one of the above methods?
You don't have to implement any of those methods. They're all implemented for you. You could certainly write and compile a servlet with none of those methods in it. It just wouldn't do anything.
You'll want to
override one of those methods if you intend to have it do some work for you.
Think of the HttpServlet as a template with all the heavy lifting already done for you.
thanks in advance for helping me to know the hidden strategy
There's nothing hidden about it. It's all publicly documented in both the
API and in the
Servlet Spec.
[ February 16, 2005: Message edited by: Ben Souther ]