Re: Servlet Init method

2005-09-01 Thread Chris Pratt
The API isn't based around GenericServlet, it's based around Servlet.   (*Chris*)On 9/1/05, Nic Ferrier <[EMAIL PROTECTED]> wrote: Chris Pratt <[EMAIL PROTECTED]> writes:> Actually, what I remember from the early days of Servlets, it is because the> Servlet API is interface based, and you can't spe

Re: Servlet Init method

2005-09-01 Thread Nic Ferrier
Chris Pratt <[EMAIL PROTECTED]> writes: > Actually, what I remember from the early days of Servlets, it is because the > Servlet API is interface based, and you can't specify constructors in a Java > interface. The developers decided to use a method that they can specify in > the interface contrac

Re: Servlet Init method

2005-09-01 Thread Chris Pratt
Actually, what I remember from the early days of Servlets, it is because the Servlet API is interface based, and you can't specify constructors in a Java interface.  The developers decided to use a method that they can specify in the interface contract.   (*Chris*)On 9/1/05, Nic Ferrier <[EMAIL PRO

Re: Servlet Init method

2005-09-01 Thread Nic Ferrier
Sreenath N <[EMAIL PROTECTED]> writes: > Reason might be init() method needs a ServletConfig object to be passed > which is used for retreving the init-params and the container can't expect > the user to write a constructor which takes the ServletConfig object > . No. Clearly this is wrong, type

Re: Servlet Init method

2005-08-31 Thread Sreenath N
t Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED] On Behalf Of Duc Vo Sent: Thursday, September 01, 2005 12:13 PM To: SERVLET-INTEREST@JAVA.SUN.COM Subject: Re: Servlet Init method In my opinion, it's because that developer can only write one public void init() met

Re: Servlet Init method

2005-08-31 Thread Duc Vo
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.