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

Answer Posted / niranjanravi

The diff is that inGeneracicServlet we had to implement the
service()method the GenericServlets service() method is
declared as abstract.But the Generic Servlet is not
implementing keeping the HttpSErvers in mind. Methods we
have in this class are
init()
log()
service()
While implementing the HTTP Servlet the service() method is
already implemented .service()method of HTTP sevlet is
declared as protected.the HTTPServlet is implementing
keeping the HttpSErvers in mind. Methods we have in this
class are
doGet(),doDelete(),doPost()

Is This Answer Correct ?    18 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the type of protocols used in httpservlet?

604


Why are http servlets used in programming?

537


What is meant by session? Tell me something about httpsession class?

592


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

603


What are common tasks performed by Servlet Container?

759






What is the purpose of inter-servlet communication?

583


How do servlets work?

528


What is the procedure of invoking different servlet in a different application?

551


Which method is called when reference variable is passed in system.net?

1819


Why do we need servlet filter?

558


What is getservletcontext?

542


What are the advantages of Servlet over CGI?

658


Differentiate between the web server and application server?

549


Are Servlets Thread Safe? How to achieve thread safety in servlets?

550


Is servlet a server side scripting language?

546