why are extending GenericServlet and why are extending
HttpServlet explain?
Answer Posted / dinesh goud
with out extending those servlets,we have to write all the methods in Servlet interface..............In order to write all the methods in Servlet interface.we go for extending GenericServlet and HttpServlet............
public UserServlet implemetns Servlet
{
provides bodies for all methods;
}
public UserServlet extends GenricServlet
{
provides bodies for methods ur wish and well
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Write a program to show the functionality of servlets.
What is the need of session tracking in web application?
Why are servlets used?
When Servlet is unloaded?
Why do we have servlet wrapper classes?
What are the mechanisms used by a servlet container for maintaining session information?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
What are the types of an http request?
What do you mean by servlet?
What is the purpose of requestdispatcher interface?
What are the disadvantages of storing session state in cookies?
What is the major difference between context parameter and context attribute?
If a servlet is not properly initialized, what exception may be thrown?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
What is servlet in web technology?