tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: internal server error
Date Sun, 02 Sep 2001 04:58:05 GMT

On Tue, 28 Aug 2001, Scott Knight wrote:

> Date: Tue, 28 Aug 2001 08:23:05 -0400
> From: Scott Knight <>
> Reply-To:
> To:
> Subject: internal server error
> 	I have a question that hopefully someone on this list can help with. I use
> the and scripts to start and stop tomcat. If i stop
> tomcat and then bring it back up and go and try to view a servlet I get an
> internal server error from apache, like tomcat really isnt up yet or
> something. But if i then hit refresh on my brower like 7 or 8 times tomcat
> will start responding like normal. I saw a message on the same topic of
> this in the mail archives but I didnt see a definite answer. Anyone know
> why this is? And is there any way to stop this?

Without details of the server components you are running (Apache version?
Tomcat version?) and the actual servlet being tested, and the *actual*
error messages and/or stack traces you are receiving, it is impossible for
*anyone* to give you any substantive help on this.

> Second question is about auto reloading. I use ant to create my war files
> so they are of the standard directory layout. After tomcat starts and
> unpacks the war I should be able to copy recompiled classes into the
> MyProject/WEB-INF/classes directory and have tomcat auto reload (server.xml
> says that auto reload is default to true ) This works most of the time. But
> sometimes i swear it wont reload my servlet until i stop tomcat, remove the
> unpacked war directory and restart tomcat. This doesn't make any sense to me?

What Tomcat are you running?  Tomcat 3.2.x has lots of problems
recognizing updated classes that are not themselves servlets -- Tomcat 4.0
fixes this particular issue.

> Also one last semi related question. Can someone tell me how tomcat decides
> what servlets to cache in memory?

*All* Java classes that are your servlets (or are referenced by your
servlets) are loaded once by the appropriate class loader.  This is a Java
thing, not a Tomcat thing.

> If it is really auto reloaded servlets,
> if i delete all my class files i shouldnt be able to get to any servlets
> correct?

No.  If you have referenced a particular class *once*, it will have
already been loaded into the JVM.  The existence or non-existence of the
".class" file where this class was loaded from is not relevant.

> But i have deleted all my class files and still can get to certain
> servlets in my web app. So how does tomcat choose what servlets to cache or
> not?
> Any and all information that can help with these three questions would be
> greatly apprecaited. Thanks in advance.
> 	Scott Knight

View raw message