Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

init() method

 
Rajib Sarma
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We know that the init() method is invoked at the very beginning of it's life cycle. I want to ask, who provide the init() method for a servlet, if we donot write it in our code?
Thanks in advance.
-Rajib
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An empty implementation is provided by javax.servlet.GenericServlet so that you dont have to implement it if you dont need to.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic