tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <mepst...@uiuc.edu>
Subject Re: Automaticaly update the servlets
Date Fri, 08 Jun 2001 15:41:22 GMT
On Fri, 8 Jun 2001, Pablo Morillas wrote:

> Yes, it is in my classpath. But I don't believe that the classpath
> is the problem becouse when I start Tomcat as a service it runs
> properly. If I change a .jsp it reload properly.

Believe it.  Probably when you start it as a service, it is using a
different classpath, so in that context the servlet is not in the
classpath.  And reloading of JSP's is done via a totally different
mechanism.

This all has to do with the way ClassLoader's work, which can be a bit
confusing.  Basically, the way reloading works is that there is a
special/custom ClassLoader that takes care of loading the relevant
classes, and checking for changes.  This ClassLoader is part of the
servlet container (in this case, tomcat).  However, anything on the
classpath is loaded by the basic, default ClassLoader, which is part
of the JDK.  When the servlet is in the classpath, it will be loaded
by the basic ClassLoader (sometimes people use the term "primordial
ClassLoader"), and reloading won't work.

Anyway, this is something that should be very easy to change, to see
if it works.

I wouldn't be surprised if many of the reported tomcat reloading
problems are because the servlet is in the classpath (not to say there
aren't problems with tomcat's reloading).

> I don't know what is happen but, when I delete the class file from
> the WEB-INF/classes the servlet run properly (incredible). Then,

Actually, this seems perfectly normal.  The servlet is in the servlet
container's JVM's memory.

> after I restart the server a error was reported. I compile it
> another in the WEB-INF/classes without restart Tomcat and it runs
> ok.

Again, this all seems perfectly normal.

> I suppose that the servlet file is in any cache of Tomcat, but I can
> be perfectly wrong.

No, you're correct.


>                     Uses Tomcat any type of GUID to run classes?
[ ... ]

Not sure what you'r asking here.


> ----- Original Message -----
> From: "Milt Epstein" <mepstein@uiuc.edu>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Friday, June 08, 2001 3:03 PM
> Subject: Re: Automaticaly update the servlets
>
>
> > On Fri, 8 Jun 2001, Pablo Morillas wrote:
> >
> > > Hello Filip.
> > >
> > > I didn't know that but, unfortunately the servlet is in the
> > > WEB-INF/classes directory. The scheme is that I start tomcat and I
> >
> > Is WEB-INF/classes in your classpath?  Because it shouldn't be if you
> > want reloading to work.
> >
> >
> > > get the correct result but, if I change the servlet and compile it
> > > the output is the same until I restart Tomcat. I've tried to remove
> > > the class file of the servlet that is in the WEB-INF/classes but the
> > > page goes up like it would be in a cache. I get the result even the
> > > class is removed. If I restart tomcat I get the error page saying
> > > that request didn't be found.
> > >
> > > I've readed several mail and I've sincronized the time between my
> > > box and the server with "net time /domain /set" and I now have the
> > > same time, but this isn't the solution.
> > >
> > > Can anybody help me, becouse I use tomcat like a service in other
> > > coumputer with IIS and I dn't want to have restart the server
> > > service when I change anything in any servlet.
> > >
> > > Thaks all.
> > >
> > > ==================================
> > > Pablo Morillas
> > > http://www.sortes.com
> > > pablo@sortes.com
> > > ==================================
> > > ----- Original Message -----
> > > From: "Filip Hanik" <mail@filip.net>
> > > To: <tomcat-user@jakarta.apache.org>
> > > Sent: Friday, June 08, 2001 2:25 AM
> > > Subject: RE: Automaticaly update the servlets
> > >
> > >
> > > > as long as your servlet classes are under WEB-INF/classes and not
> > > > WEB-INF/lib Tomcat will reload servlets.
> > > > and it always reloads JSP pages
[ ... ]

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


Mime
View raw message