• Post Reply Bookmark Topic Watch Topic
  • New Topic

init(ServletConfig)  RSS feed

 
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
Posts: 4001
42
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
Boost this thread!