• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the difference between 2 init() methods.

 
chandra kunchala
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
Any body tell me that.
we have 2 init() methods in GenericServlet right?
can you tell me the difference between these 2 init() methods.
 
Matteo Di Furia
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you read the JavaDoc of GenericServlet, you'll find that the container will call init(ServletConfig). For convenience sake, the method init() will be called by init(config) and you only need to override init() to do what you have, so you don't have to worry about getting a ServletConfig object somewhere. As you can also read in init() JavaDoc, calling getServletConfig() will return a ServletConfig even if you've overridden init() method only.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic