File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes init() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "init() method" Watch "init() method" New topic

init() method

Ravi Vemula

Joined: Aug 18, 2011
Posts: 1
Can a servlet be intialized without calling its init() method???
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
That method is part of the official lifecycle, so it will be called. Your servlet is free, of course, not to do anything in it.
jitu mishra

Joined: Aug 19, 2011
Posts: 5
Init is the part life cycle of servlet and if you not given also init it will automatically set the configuration for servlet intialization .............
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Welcome to JavaRanch Ravi
I agree. Here's the link:
subject: init() method
It's not a secret anymore!