Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

init(ServletConfig)

 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
life cycle of servlet includes, init() , service() and destroy() methods. In our servlet that extends httpServlet, we can override init() method. but what is the purpose of overloaded method of init(ServletConfig)?
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but what is the purpose of overloaded method of init(ServletConfig)?


init(ServletConfig config) will be called by the servlet container. And init() is a convenient method which developer should override for application specific initialization in the servlet.

 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks vijitha. i just read 5th chapter and it is right there. i could not recollect it earlier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic