Multiple choice technology web technology

Difference between GenericServlet and Httpservlet class

  1. GenericServlet normal purpose HttpSerlvet for complex process

  2. both are same but parameters are different

  3. both of above

  4. GenericServlet is protocol independent, HttpServlet is protocol dependent

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

GenericServlet is protocol-independent and can handle any protocol, while HttpServlet extends GenericServlet specifically for HTTP protocol with HTTP-specific methods like doGet, doPost. HttpServlet is the most commonly used servlet type for web applications.