tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. William McCarthy" <>
Subject Can't get servlets to work in a new context
Date Mon, 29 May 2000 19:16:03 GMT
I can't seem to get any servlets working in new contexts for the life of
me.  I followed the directions exactly.  Here's what I did:

1. I created a new directory, /home/tomcat/webapps/develop
2. In /develop, I created a WEB-INF/classes directory
3. I place a copy of in the /classes folder.  I
compile it.  It compiles fine.
4. I copy a web.xml from /home/tomcat/ROOT/WEB-INF into my WEB-INF
5. I add the following lines to my server.xml file (right below where
the "example" entry:

    <Context path="/develop"
        debug="0" reloadable="true">

6. I add the following lines to my tomcat-apache.conf file, which I
include in the apache httpd.conf file:

    ApJServMount /develop/servlet /develop
    <Location /develop/WEB-INF/ >
        AllowOverride None
        deny from all

7. I restart both apache and tomcat.  I can browse to
http://localhost/develop.  If I have static pages there, I can see
them.  If I try to access the servlet at
http://localhost/develop/servlet/HelloWorldExample - No good.  I get a
404 from Tomcat. (Not apache)  If I misspell HelloWorldExample, but
leave the rest of the URL the same, I get a 404 from Apache.

All the examples, both servlets and JSPs, work fine.  Any ideas?


View raw message