• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet initialization

 
sunil kumre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why servlet initialization is done using init() rather than a constructor?
thanks in advance
sunil.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Constructors for dynamically loaded classes (such as servlets) could not accept arguements. Using the init method serves to provide for any initialization that may be needed.

Bosun
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic