That was "constructor" btw.
Also. just to clarify more. Nic also mentioned that the init is called once.
"it is created once, init() is called and then it services each
request."

This is the default behavior although you should read about distributed and
SingleThreadModel servlets to see some possible exceptions to this rule.

But with the default (as we can only assume that is what ur doing) there is
only 1 instance of that Servlet running.

I think that was implied in my last email but I just wanted to make it more
clear.
-Tim

-----Original Message-----
From: Chen, Gin [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 1:15 PM
To: [EMAIL PROTECTED]
Subject: Re: servlet init parameters - again


I think Nic did a great job of answering the question.
If you read his reply without looking at it with such a critical eye, you'll
see that he mentions that
"Because the servlet is still loaded and working"
To your question.
This means that the Servlet has been initialized by u to have values for the
host and name.
Since there is nothing in ur code to change or reset the values.. that is
the way they remain.

Its almost like changing init to be a constructor and saying:
Servlet x = new Servlet();

x has data members of host and name and you gave them values in the
"onstructor".
Why should they "vanish"?

-Tim

-----Original Message-----
From: Piotr Korzybski [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 1:09 PM
To: [EMAIL PROTECTED]
Subject: Re: servlet init parameters - again


Nic,
thank you for your INTERESTING reply.
I will complete my knowledge concerning servlet lifecycles.

> It would help if you sent the source for the code that is not
> working, rather than the code that is working.
I am pretty sure now that my inquiry was too long.
Your remark evidently testifies you didn't read my question.

> Otherwise we can't see what you've done wrong, can we?
I have done nothing wrong. I have just asked the question
concerning specific running of  the servlet.

> You should go read some basic servlet introduction for more details.
Yes, it is a basic problem. For such ones I would prefer simple explanations
more experienced people instead of admonishing.

With best regards,
Piotr

___________________________________________________________________________
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

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to