File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
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

A simple servlet running on Tomcat 4.1.12

Jet Ink

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.
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
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: 17280

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

An IDE is no substitute for an Intelligent Developer.
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.
I agree. Here's the link:
subject: A simple servlet running on Tomcat 4.1.12
It's not a secret anymore!