• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A simple servlet running on Tomcat 4.1.12

 
Jet Ink
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18281
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's one hint. Re-register using your real name. You'll get a faster response that way.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic