You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Knight <sc...@loanprotector.com> on 2001/08/28 14:23:05 UTC

internal server error

	I have a question that hopefully someone on this list can help with. I use 
the startup.sh and shutdown.sh 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?

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?

Also one last semi related question. Can someone tell me how tomcat decides 
what servlets to cache in memory? If it is really auto reloaded servlets, 
if i delete all my class files i shouldnt be able to get to any servlets 
correct? 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


Re: internal server error

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 28 Aug 2001, Scott Knight wrote:

> Date: Tue, 28 Aug 2001 08:23:05 -0400
> From: Scott Knight <sc...@loanprotector.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: internal server error
>
> 	I have a question that hopefully someone on this list can help with. I use
> the startup.sh and shutdown.sh 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
>
>
Craig