What are the difference between HttpServlet and
GenericServlets?
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 ? | 3 Yes | 6 No |
Post New Answer View All Answers
What is Client-Server Computing?
Explain jsessionid?
What do you mean by url pattern in servlet?
What is servlet api used for conneting database?
What is a server side include (ssi)
Why do we have servlet wrapper classes?
What is the requirement of servlet config and servlet context implemented and how are they implemented?
What are the differences between servlet context vs servlet config?
What are the ways to handle multi-threading in servlets?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
How will two or three servlets interact or communicate with each other?
When should you prefer to use doget() over dopost()?
What is the main purpose of java servlets?
How to read request headers from servlets?
What is the directory structure of a war file?