I agree with you, there's no clarity about that issue, so I tried to put
together some of the references in the different available documents:

>From the User Guide, defining the RELOADABLE parameter of the <context > tag
in server.html:

"When developing a servlet it is very convenient to have Tomcat reload it
upon change, this lets you fix bugs and have Tomcat test the new code
without the need to shutdown and restart. To turn on servlet reloading set
the reloadable flag to true. Detecting changes however is time consuming;
moreover, since the new servlets are getting loaded in a new class-loader
object there are cases where this class-reloading trigger casts errors. To
avoid these problems you can set the reloadable flag to false; this will
disable the autoreload feature."

>From "Real World Configuration Tips":

"Servlet auto-reloading is really useful for development time. However it is
very expensive (in performance degradation terms) and may put your
application in strange conflicts when classes that were loaded by a certain
classloader cannot co-operate with classes loaded by the current
classloader.

So, unless you have a real need for class reloading during your deployment
you should turn off the reloadable flag in your contexts. "

>From the Tomcat FAQ: "Does Tomcat reload changed servlets? "

"Tomcat 3.1b reload changed servlets from it's WEB-INF directories.

Note: Do NOT include the classes or .jar files from WEB-INF directories for
which you want to enable automatic servlet reloading in the CLASSPATH of the
shell that starts Tomcat.

I had a two-day struggle with init-files, classpaths, reloads etc. before I
spotted a small comment in tomcat.properties that states the CLASSPATH for
the
main execution of Tomcat must not contain servlets one wants to reload - and
now
I just want to let you know :) "


>From my experience with Tomcat 3.1:  (maybe things have changed for 3.2 B6,
the current milestone)

- JSP's are regenerated and reloaded OK when they change.
- Classes are NOT reloaded (succesfully) no matter if they are in the system
CLASSPATH or in the WEB-INF directory.... You will always have to restart
Tomcat....


Julio Serje
Calian Tech.
Ottawa, Canada.





----- Original Message -----
From: Steve Goyette <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 30, 2000 2:16 PM
Subject: ClassCastException,Beans, and Constant Restarts


> I have read quite a few posts regarding this, but I could not find a clean
> cut answer.  Using Tomcat 3.2 can I make changes to a bean, recompile,
touch
> my JSP file that accesses that bean, and view my page with the new bean?
> Currently I am getting a ClassCastException.  Why, when the JSP file has
to
> be recompiled, does it not find the new version of the bean?  Is there a
> workaround for this?
>
> thanks in advance,
>
> steve
>
>

Reply via email to