Re: Servlet Init method

Duc Vo <[email protected]> Thu, 1 Sep 2005 16:43:15 +1000
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
In my opinion, it's because that developer can only write one public =
void init() method but several public constructors of a servlet. There =
will be no guarrantee that which constructor will be used by the =
container, hence the J2EE STANDARD to use init method to initialise the =
servlets.

________________________________

From: A mailing list for discussion about Sun Microsystem's Java Servlet =
API Technology. on behalf of Senthil_Theerthagiri
Sent: Thu 05/09/01 4:25 PM
To: [email protected]
Subject: Servlet Init method



Hi,

=20

                I am a beginner in servlet programming. . I have a =
question in that. Can anybody clear it for me? =20

=20

                Why do we have init() method instead of constructor. =
Bcaz servlet is also a java class file, so why don't we use constructor =
instead of init().=20

=20

Regards
SenthilKumar Theerthagiri
Satyam Computers Chennai.
Ph: 24353221 - Ext: 3709

=20

-- You  can do everything, if it's important enough to you to do.

=20

DISCLAIMER:
This email (including any attachments) is intended for the sole use of =
the intended recipient/s and may contain material that is CONFIDENTIAL =
AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or =
copying or distribution or forwarding of any or all of the contents in =
this message is STRICTLY PROHIBITED. If you are not the intended =
recipient, please contact the sender by email and delete all copies; =
your cooperation in this regard is appreciated..

_________________________________________________________________________=
__ To unsubscribe, send email to [email protected] and include in =
the body of the message "signoff SERVLET-INTEREST".=20

Archives: http://archives.java.sun.com/archives/servlet-interest.html =
Resources: http://java.sun.com/products/servlet/external-resources.html =
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html=20

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html