*
The moose likes Servlets and the fly likes Mechanism of init method to initialize servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Mechanism of init method to initialize servlet" Watch "Mechanism of init method to initialize servlet" New topic
Author

Mechanism of init method to initialize servlet

abhijeet srivastava
Greenhorn

Joined: Aug 22, 2006
Posts: 26
Hi all!

I have some doubts about init method in servlet initialization.

1. if init method is not overridden the which version of init method is called by Container?
init() or init(ServletConfig)

2. when init() version of init method is overridden then how Container get ServletConfig object for that servlet?

Thaks...
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by abhijeet srivastava:
1. if init method is not overridden the which version of init method is called by Container?
init() or init(ServletConfig)


Read the docs.


2. when init() version of init method is overridden then how Container get ServletConfig object for that servlet?


docs.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Also covered in the Servlets FAQ.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mechanism of init method to initialize servlet