What is Generic Servlet and how it is different from Http
Servlet?

Answer Posted / l sujata

Actually generic sevlet class is a super class of
HttpServlet class.both of these classes are abstract in
nature.As in generic servlet service () methob is not
defined so they r defined in HttpServlet class. as we are
not interested to create an object of HttpServlet class
so,we make it as abstract class and class that implemnts
HttpServlet Class creates objects and uses three methods
such as init(),service(),destroy() mainly.

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When to use doget() and when dopost()?

629


What do you mean by request dispatcher in servlet?

611


Explain is servlet mapping?

582


What are the advantages of servlets over traditional cgi?

630


Explain how to improve Servlet Performance?

598






What do you mean by request dispatcher in servlet? Also explain its methods.

610


What do you mean by a filter and how does it work?

540


How servlets are deployed in java?

546


Is it good idea to create servlet constructor?

744


How do you design microservices?

625


How can we create deadlock situation in servlet?

852


Can we override servlet service method?

587


How does tomcat servlet container work?

592


What is servlet instance?

544


What is meant by a servlet?

604