You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul Foxton <pa...@network-sol.com> on 2001/07/19 12:23:12 UTC

RE: Class reloading

AFAIK tomcat doesn't support automatic reloading of classes. You do have to
restart.

Paul

> -----Original Message-----
> From: John Baker [mailto:jbaker@teamenergy.com]
> Sent: 19 July 2001 11:36
> To: tomcat-user@jakarta.apache.org
> Subject: Class reloading
> 
> 
> Hello.
> 
> If I write a class and use it in a jsp page, then change the 
> class, I have to 
> restart tomcat. Is there any way I can get around this, ie 
> tell tomcat to 
> reload the class (and forget about the cached loaded copy I 
> expect it has).
> 
> 
> John
> 
> -- 
> John Baker, BSc CS.
> Java developer, Linux lover.
> I don't wanna rock, DJ.
> 

Re: Class reloading

Posted by Alex Fernández <af...@tid.es>.
In fact, Tomcat does support automatic reloading of classes.

When you declare a context, add a 'reloadable="true"' attribute:
    <Context path="/admin" 
             docBase="webapps/admin" 
             reloadable="true" 
             trusted="false" > 
See apps-admin.xml or server.xml for an example.

In Tomcat 3.2.1, this feature did not always work well, especially with
JSPs; in Tomcat 3.3 I cannot remember if it was enabled yet.

Un saludo,

Alex.

Paul Foxton wrote:
> 
> AFAIK tomcat doesn't support automatic reloading of classes. You do have to
> restart.
> 
> Paul
> 
> > -----Original Message-----
> > From: John Baker [mailto:jbaker@teamenergy.com]
> > Sent: 19 July 2001 11:36
> > To: tomcat-user@jakarta.apache.org
> > Subject: Class reloading
> >
> >
> > Hello.
> >
> > If I write a class and use it in a jsp page, then change the
> > class, I have to
> > restart tomcat. Is there any way I can get around this, ie
> > tell tomcat to
> > reload the class (and forget about the cached loaded copy I
> > expect it has).
> >
> >
> > John
> >
> > --
> > John Baker, BSc CS.
> > Java developer, Linux lover.
> > I don't wanna rock, DJ.
> >

Tomcat cache

Posted by Laroche Eric <el...@reef.com>.
I d like to know if it is possible to configure the way tomcat cache works.
In jrun, cache files are placed inside folders, but in tomcat, they are
outside.


Re: Class reloading

Posted by Endre Stølsvik <En...@Stolsvik.com>.
On Thu, 19 Jul 2001, Paul Foxton wrote:

| AFAIK tomcat doesn't support automatic reloading of classes. You do have to
| restart.

AFAIK all tomcats does support automatic reload, but it (at least 3.2)
sucks. If you have "very plain servlets", which doesn't put many "real"
objects into the HttpSession (just Strings, Longs and the like), then it
works pretty good. But if you try to use selfmade objects, you get hit by
severe ClassLoader issues (You'll get ClassCastExceptions all the time).

Tomcat 4 should work, but I haven't tested it yet. It uses a funky scheme
of serializing the whole Sessions stuff, and restarting the whole webapp,
and then "booting" it up again. What happens with singletons, I ask, but
haven't tested it yet, as mentioned.

Look at tomcat's xml configure file, it's a <auto-reload>'ish parameter,
turn it to true..

-- 
Mvh,
Endre