Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servletconfig and servletcntext

 
abhinav rajput
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the main purpose of these things in a servlet. I really dont understand.
Why should we overrite init(). does container dont call init()
 
Tim Moores
Bartender
Posts: 2500
10
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the main purpose of these things in a servlet. I really dont understand.

Give it a shot and try to explain to us what you did understand. The javadocs of ServletContext in particular go to some length explaining what it does. Ask yourself this: If you didn't have the methods in those classes, how would you go about doing the things they do?

Why should we overrite init(). does container dont call init()

You need to differentiate between Servlet.init(ServletConfig) and GenericServlet.init(). I suggest to read their respective javadocs; that should make things clearer.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic