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 servlet container. how it works?
What do you mean by a filter and how does it work?
Is java servlet still used?
How do we translate jsp?
How can you use a servlet to generate a plain text instead of html?
What's the difference between authentication and authorization?
Can we use the constructor, instead of init(), to initialize servlet?
What is the servlet?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
Which event is fired at the time of setting, getting or removing attribute from application scope?
What's the advantages using servlets than using cgi?
Write the code to get the server information in servlet.
What is servlet and its use?
What is the life cycle of a servlet?
Explain the custom jsp tags and the beans.