aspose file tools*
The moose likes Tomcat and the fly likes A simple servlet running on Tomcat 4.1.12 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "A simple servlet running on Tomcat 4.1.12" Watch "A simple servlet running on Tomcat 4.1.12" New topic
Author

A simple servlet running on Tomcat 4.1.12

Jet Ink
Greenhorn

Joined: Feb 06, 2002
Posts: 3
Hi, I have installed Tomcat 4.1.12 and tried to run a sample but it failed.
I tried to run a sample servlet under Tomcat examples directory and it works.
http://localhost:8080/examples/servlet/HelloWorldExample
So I guess there is no classpath problem here.
But when I create a new directory, myAPP which resides in the same level as examples directory, and have a index.html under myAPP, I just could not make it work through
http://localhost:8080/myAPP/index.html
I did add a myAPP Context element in the server.xml under Conf as
<Context path="/myAPP" docBase="myAPP" debug="0" reloadable="true"></Context>
and I did restart Tomcat.
Would you please give me hints? Thank you!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Here's one hint. Re-register using your real name. You'll get a faster response that way.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I think that Tomcat really likes to see a WEB-INF directory with a web.xml file in it. If it doesn't, it's been reported that Tomcat will fail to load that context.
 
Don't get me started about those stupid light bulbs.
 
subject: A simple servlet running on Tomcat 4.1.12