|Servlet won't refresh [message #186494]
||Thu, 18 January 2007 20:00
Originally posted by: spam.free.fr|
There is something I do not understand on eclipse :
When I write a servlet, I need to restart the server manually in order to
take the changes of code. What I do not understand is that, according to
the help file, Eclipse, if configured correctly in the server settings
should normally automatically restart the server. I ticked the box to
republish but no avail.
Moreover, it seems a little extreme to me to need to restart the whole
server to change a single servlet. I though that it was possible to
restart only the web app.
Can someone shed some light on this please ?
|Re: Servlet won't refresh [message #187265 is a reply to message #187252]
||Mon, 29 January 2007 14:39
| Larry Isaacs
Registered: July 2009
The typical sequence of events when modifying a servlet is that when the
servlet is saved, the changes are published (assuming auto-publishing is
enabled) and if the server was running, the server goes into the Restart
state. However, because the "reloadable" context attribute defaults to
true when adding projects to a Tomcat server, you should see console
message like "INFO: Reloading this Context has started", indicating that
the Context for the changed project has reloaded. Following this
reload, you should be able to see the changes in your servlet. The
Tomcat plug-ins in WTP don't have a good way to know about this reload,
so it assumes a restart is necessary. You can postpone the restart if
The Context reload or server restart is needed to cause the classloader
containing the old version of the servlet to be discarded and replaced
with a new one to hold the new version. Note that the classloader in
question is the web application's classloader, and that it is easy for
this classloader to leak, i.e. not be garbage collectible for a variety
of reasons. If this is the case, then with enough reloads, the server
will run out of memory and a restart will be needed to start fresh again.
> The version of WTP is RC1.5.2
> Tomcat is 5.5
> Thank you for your concern.
Powered by FUDForum
. Page generated in 0.03662 seconds