"Meng, Dong J (CAP, CDI)" wrote:

> Hi,
>
> I use jsdk2.1 on UNIX. I created some servlets classes and put them into
> jsdk2.1 server. Later on, I updated one servlet class on jsdk2.1 server, I
> checked the page of this class on the brower, I found there was no change at
> all. Then I delete this class from jsdk2.1. I checked the class page on the
> brower, it still be there(it should be no this page). I used another
> computer to access this page, the same thing happened.

What you are seeing is correct behavior, based on how Java and servlets work.

The first time you reference a class (your servlet, in this case), the object
code bytes of the class are loaded into the memory of the Java Virtual Machine
(JVM) running your servlets.  The bytes are read from wherever it finds this
class on your classpath.  Once the servlet has been read, the JVM finds it in
memory on subsequent references, so deleting it from your disk will have no
impact.

>
> Then I use 'stopserver' command on the UNIX to stop jsdk2.1 server, use
> 'startserver' to start jsdk2.1 server. I FPT my updated class to jsdk2.1. I
> checked the page and found the result has been changed accordly.
> My question is: In jsdk2.1 server, if I do not do 'stopserver' -
> 'startserver' process, even I overwrite servlet class, does it not affect
> the result? How can I solve this problem without doing 'stopserver' -
> 'startserver'?
>

Some servlet engines support automatic reloading of servlets when they are
changed -- check the documentation for each engine to know if this feature is
supported.  However, the JSDK 2.1 servlet engine is not one of those.  The
stopserver/startserver process is the only way to do it with this server.

>
> Thanks in advantance.
>
> DJ
>

Craig McClanahan

___________________________________________________________________________
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