File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what if we override the init(ServletConfig) and dont call super()

 
yogendra singh
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what if we override the init(ServletConfig) and dont call super(). will it create the instance of servlet.what the mean fo passing servletConfig object to the servlet other than initialze parameter and giving referenve of server environment.
 
Vadiraj Deshpande
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If we override init(ServletConfig) method and don't call super(servletConfig) then the servletConfig reference is not stored in the GenericServlet and if we call getServletConfig() we get null.
If we want to override the init method, we can use other init() of GenericServlet method which has no parameters.
Regards,
-Vadiraj
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic