can we override service method in my servlet class..?? if
yes or no why ??

Answer Posted / ruchi

we can override service method in my servlet class if the
request is not protocol dependent.
Bcoz we exdend HttpSrevlet class to handle Http GET and
POST requests and we have to override some methods like
doGet,doPost,doHead,doPut,doDelete.

But if u want to override service method then u have to
extend genricServlet Class.Then only u can implement Service
() method.

Is This Answer Correct ?    52 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the directory structure of web application?

530


explain the advantages of servlet life cycle?

562


What are the objects involved when a servlet receives a call from client?

548


What is difference between jsp and servlet?

648


Explain the role of dispatcherservlet and contextloaderlistener.

610






What are different ways for servlet authentication?

568


Which method is called when reference variable is passed in system.net?

1838


What is the difference between portlet and servlet?

514


how the HTML data stored in web server?

1955


What is the workflow of a servlet?

720


What is the use of request dispatcher interface?

571


What is the use of servlet context?

537


What is the difference between the http servlet and generic servlet?

604


What are the mechanisms used by a servlet container for maintaining session information?

570


What is the need of servlet filters?

542