can we override service method in my servlet class..?? if
yes or no why ??
Answer Posted / rajesh
We can override Service method in the servlet when we extend GenericServlet to create servlet as it is mandatory to override it. But when we extend HttpServlet to create a servlet then we cant override service as we need to override doGet or doPost method of HttpServlet
Is This Answer Correct ? | 17 Yes | 6 No |
Post New Answer View All Answers
What is servlet in simple terms?
What are the differences between servlet context vs servlet config?
How do you create a cookie using servlet?
What’s the difference between genericservlet and httpservlet?
Explain jsessionid and when is it created?
Difference between forward() method and sendredirect() method ?
How servlets are deployed in java?
What is the difference between servlet and jsp?
What is http servlet? Explain with the help of an example.
What is cgi and what are its drawbacks?
Which exception is thrown if the servlet is not initialized properly?
Can filter be used as request or response?
What's the use of servletcontext?
Write a program to show the functionality of doget and dopost method?
What is the difference between context parameter and context attribute?