This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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
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: 17046
    
  26

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: A simple servlet running on Tomcat 4.1.12
 
It's not a secret anymore!