Roedy Green said:
Is there an official way to shutdown a Servlet so that it will load
new code? It seems that an uncaught NullPointerException will do it,
but that seems a little hokey.
I would expect that not only is hokey, but it's probably highly
container specific.
Unfortunately, everything about this question is going to be
container-specific anyway. There are some containers that auto-detect
new versions of servlet code and load it without you having to do
anything except drop the new class file in place. (And this may only
work if you have naked .class files in WEB-INF, no jars)
Many containers give you a way to restart an individual web
application from the command line or through some kind of admin
servlet. Still others, you just plain have to shut down the entire
server.