You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jacob Kjome <Ja...@syntegra.com> on 2000/05/24 19:14:05 UTC
myapp question
I have been having a problem setting up the myapp webapp that comes in the
sample folder in the docs.
Now, I did end up being able to run it, but not until I changed the class
from Hello.class to some other name, such as HelloWorld.class
as soon as I did this, it ran just fine.
I had been thinking it was the web.xml file, but no matter what I did, it
would give me this error when I ran the Hello.class
Error: 404
Location: /myapp/hello
File Not Found
/myapp/hello
Does Tomcat just not like the name Hello.class for a classname??? Unlikely!
My theory is that I had things improperly set up at first and ran the
Hello.class servlet and it got a 404 error and cached that output for the
Hello.class. Is there a place in Tomcat where it caches the output of a
class? Is there a way to flush it?
I have had no problem getting a servlet by any other name running
correctly????
Thanks,
Jake
Re: JSP & cache
Posted by Benedicte Luet <lu...@db.erau.edu>.
Carl,
I did not see any answer to your question. I apologize if someone already
replied.
The compiled JSP code is stored under the $TOMCAT_HOME/work directory. You
will find one sub directory per context you have set up. You can flush it by
deleting the files within those sub directories. It will force tomcat to
recompile.
If you just want to reload a class that you modified, you can set the
context's reloadable parameter in server.xml to true, or just restart tomcat.
Benedicte
Unix Administrator
Embry-Riddle University
Carl Parrish wrote:
> Does Tomcat cache JSP code? And if so how do you flush it?
>
> Thanks,
> Carl Parrish
> Webmaster
> ComputerPREP.com
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
JSP & cache
Posted by Carl Parrish <cp...@computerprep.com>.
Does Tomcat cache JSP code? And if so how do you flush it?
Thanks,
Carl Parrish
Webmaster
ComputerPREP.com
Re: myapp question
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Jacob Kjome wrote:
> I have been having a problem setting up the myapp webapp that comes in the
> sample folder in the docs.
>
> Now, I did end up being able to run it, but not until I changed the class
> from Hello.class to some other name, such as HelloWorld.class
>
> as soon as I did this, it ran just fine.
>
> I had been thinking it was the web.xml file, but no matter what I did, it
> would give me this error when I ran the Hello.class
>
> Error: 404
> Location: /myapp/hello
> File Not Found
> /myapp/hello
>
> Does Tomcat just not like the name Hello.class for a classname??? Unlikely!
> My theory is that I had things improperly set up at first and ran the
> Hello.class servlet and it got a 404 error and cached that output for the
> Hello.class. Is there a place in Tomcat where it caches the output of a
> class? Is there a way to flush it?
>
> I have had no problem getting a servlet by any other name running
> correctly????
>
There's no restrictions on filenames that would mess this up. The correct URL
is supposed to be "http://localhost:8080/myapp/hello" because that is what the
<servlet-mapping> entry says. And, the class name it looks for is Hello.class
(because that is what the <servlet> entry says).
The only reason you would get a 404 is if the web app was not completely
deployed. After you build it, you should end up with the following files
(assuming you are deploying into the "webapps" directory under $TOMCAT_HOME):
$TOMCAT_HOME/webapps/myapp/
WEB-INF/
web.xml
classes/
Hello.class
hello.jsp
index.html
images/
tomcat.gif
If there was a compile error, or if you didn't do the "build compile" step, the
class file might not be there.
Be sure you restart Tomcat after making any changes, unless you've set up this
context for auto-reloading in the "conf/server.xml" file.
>
> Thanks,
>
> Jake
>
Craig McClanahan
Re: myapp question
Posted by Jim Rudnicki <jd...@pacbell.net>.
Maybe: Case sensitive.
Jim
----- Original Message -----
From: "Jacob Kjome" <Ja...@syntegra.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, May 24, 2000 10:14 AM
Subject: myapp question
> I had been thinking it was the web.xml file, but no matter what I did, it
> would give me this error when I ran the Hello.class
>
> Error: 404
> Location: /myapp/hello
> File Not Found
> /myapp/hello