Close sidebar

Can we override init() and Destroy() in Servlet ?

i want to know can i able to Overrride init() and Destroy() method of servelt ????

  • Sahil
  • 806 Views
  • 7 Answers
  • yes, we can override.


  • yes we can because whenever we are extending our class from abstract class we must override all the abstract methods from that class.....


  • yes ,we can override 


  • pIn servlet there is five abstract method ./ppinit()     service()   destroy()   getServletConfig()  getServletInfo()/ppthese all are abstract and it must to override all...it is compulsary./pp /p


  • Yes of course we can .try it out .its because of us developers only to make developer customised servlet life cycle.


  • Yes we can override all the 5 methods which are available in Servlet interface.

    • Krishnamaneni Vilas kumar Naidu
    • 11 Jun
    • 0 Comments

Dicussion/Forum
Servlets
Ask New Question
Now you can become Community Moderator
Only Youth and Educator can become Moderator.