tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mason Jones <ma...@clipshow.com>
Subject Re: Restart tomcat when recompiling servlet
Date Tue, 15 Aug 2000 19:28:28 GMT

I'm having problems with class reloading as well, though they're
slightly different: almost always, but not quite always, when I
recompile a class and I get the expected "Reload!" message
from tomcat, I get a servlet error about a *different* class, and
I have to restart tomcat. I haven't figured out why recompiling a
servlet would cause a tomcat error about a different class
(the class it's complaining about is in my session, though the
recompiled one isn't).

Oscar Sanchez Vilar wrote:
>Yeah, I meant that classes in such directory are accessible so you don't 
>need to
>put that path in the CLASSPATH environment variable. So, I have my servlet 
>class
>in the Web-inf/classes and that directory is not included in the CLASSPATH
>environment variable. That's why I don't understand why modifications to that
>class are not automatically reloaded (by the way, tomcat prints a RELOAD!!
>message in the output window).
>
>Oscar
>
>Kelly Wilson wrote:
>
> > Hmmm...  Tomcat does not include any of my WEB-INF/classes directories in
> > the classpath automatically.  Are you sure we're talking about the same
> > "classpath" here?  I'm referring to the CLASSPATH environment variable, not
> > the directories specified in server.xml in which Tomcat looks for servlets.
> >
> > Somewhere in the documentation it explains that if a class is located 
> in the
> > classpath, the default Java class loader is used, which doesn't support
> > automatic class reloading.  Thus, it wouldn't make much sense for Tomcat to
> > automatically add all those directories to the classpath, or automatic 
> class
> > loading wouldn't work.
> >
> > -- Kelly
> >
> > ----- Original Message -----
> > From: "Oscar Sanchez Vilar" <sanchezo@tcd.ie>
> > To: <tomcat-user@jakarta.apache.org>
> > Sent: Tuesday, August 15, 2000 11:56 AM
> > Subject: Re: Restart tomcat when recompiling servlet
> >
> > > Hi,
> > >
> > > The servlet class file is in my Web-inf/classes directory (as it should
> > be)
> > > which is automatically included in the classpath by jakarta making it
> > > available. Being there, I expected jakarta to reload it!
> > >
> > > Oscar
> > >
> > > Kelly Wilson wrote:
> > >
> > > > Is the servlet class in question in your classpath?  If it is, it will
> > not
> > > > be automatically reloaded, regardless of whether or not "reloadable" is
> > set
> > > > to true.
> > > >
> > > > -- Kelly
> > > >
> > > > ----- Original Message -----
> > > > From: "Oscar Sanchez Vilar" <sanchezo@tcd.ie>
> > > > To: <tomcat-user@jakarta.apache.org>
> > > > Sent: Tuesday, August 15, 2000 11:46 AM
> > > > Subject: Restart tomcat when recompiling servlet
> > > >
> > > > > Hello list
> > > > >
> > > > > I have a web application configured to be reloadable, but some times
> > > > > when I rebuild the application and a servlet recompilation is
> > involved,
> > > > > the new version of the servlet is not instantiated, keeping the old
> > one,
> > > > > and then I have to stop jakarta, stop apache, and restart again.
Is
> > that
> > > > > normal?
> > > > >
> > > > > Tanks,
> > > > >
> > > > > Oscar
> > > > >
> > > > >
> > >
> > >
> > >
> > >


________________________________________
   Mason Jones              mason(at)clipshow.com
   Director of Software Development
   ClipShow, Inc.            www.clipshow.com
   (650) 696-3164           fax (650) 696-3267


Mime
View raw message