Hunter Hillegas wrote:

> Right now I have to restart Tomcat every time I change my Web app (I use
> ant's build all) because if I don't I get ClassCastExceptions from my
> beans... Will this ever change? 4.0?
>

In 4.0, you will still need to restart the webapp, but you can do it fairly
easily without having to restart Tomcat, through the use of the "manager"
webapp.  This works even if you did not mark the webapp to be "autoreload"
in the server.xml file.

First, modify the "conf/tomcat-users.xml" file so that one or more users are
assigned the role "manager".  It does not matter what the username and
password are, or how many usernames you assign this role to.

Now, to force a webapp reload, simply point your browser at:

    http://localhost:8080/manager/reload?path=/myapp

where "/myapp" is the context path of the webapp you want to reload (must be
running on the same instance of Tomcat).  You will be challenged for a
username and password the first time you do this, and will receive a
confirmation that the reload has been completed.

As an extra added benefit :-), any active sessions will be saved and
restored across this restart (as well as a manual shutdown and startup of
the entire Tomcat JVM), including any session attributes that implement the
java.io.Serializable interface.

>
> Hunter Hillegas, MCP

Craig McClanahan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to