Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Why Init() method

 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have a basic question. Why there is a Init method in servlets. Can't we have a constructor do what Init method does ?
 
Shantanu Puranik
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Report post to moderator
Chetan,

This question is already answered HERE.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Report post to moderator
servletConfig and servletContext are not available in constructor..
 
    Bookmark Topic Watch Topic
  • New Topic