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


Please Help Members By Posting Answers For Below Questions

What is the need of session tracking in web application?

585


What are common tasks performed by Servlet Container?

771


What are the benefits of using servlet over cgi?

580


What do you mean by filter in servlet?

538


How to get the server information in a servlet?

685






hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2283


What are the key methods that are involved in processing of http servlets?

626


What is session tracking?

698


What is the difference between CGI and Servlet?

590


How do I know if java is running on linux?

607


Why don't we write a constructor in a servlet?

592


Define the life cycle of a servlets.

573


What are the advantages of Servlet over CGI?

669


Explain servlet.

571


What is cookie in servlet?

596