File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes init() instead of constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "init() instead of constructor " Watch "init() instead of constructor " New topic
Author

init() instead of constructor

richa singhal
Greenhorn

Joined: Mar 17, 2010
Posts: 1
why dont we create an object of a servlet instead of using init()?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Welcome to the ranch !

Check out the servlets FAQ.


[My Blog]
All roads lead to JavaRanch
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I think you meant this entry in the FAQ :)
Brij Garg
Ranch Hand

Joined: Apr 29, 2008
Posts: 234
[removed]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That's what we said, but instead of just giving the answer, we provided both the experience of going to where the answer is, and access to a list of *other* answers.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

David Newton wrote:I think you meant this entry in the FAQ :)

Oops... Thanks David for correcting this.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: init() instead of constructor
 
Similar Threads
JDCert Q - Applet
init() method
Why using init() method
init methods of Servlets: need clarification
Trying EJB3 from Eclipse WTP Book