You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Wentzel <Mi...@aswethink.com> on 2001/08/01 18:45:56 UTC
RE: HTTP 404 Error
> I'm stumped. I have the following directory structure/files:
>
> c:/tomcat/webapps/ServletTest/WEB-INF/web.xml
> c:/tomcat/webapps/ServletTest/WEB-INF/classes/ServletTest.class
>
> I added the following to my server.xml file:
>
> <Context path="/ServletTest"
> docBase="webapps/ServletTest"
> crossContext="false"
> debug="0"
> reloadable="true" >
> </Context>
>
> And my web.xml contains:
>
> <web-app>
> <servlet>
> <servlet-name>ServletTest</servlet-name>
> <servlet-class>ServletTest</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>ServletTest</servlet-name>
> <url-pattern>/ServletTest</url-pattern>
> </servlet-mapping>
> </web-app>
>
> If I attempt to open http://localhost/ServletTest, I get HTTP
> 404, file not
> found.
> If I attempt to open http://localhost:8080/ServletTest, I get the page
> cannot be displayed.
To get your desired results you can either change your server.xml to be
<Context path="/"
docBase="webapps/ServletTest"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
where the important thing to note is the path, or you can change the request
to be http://localhost:8080/ServletTest/ServletTest.
---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
RE: HTTP 404 Error
Posted by Jeff Rancier <je...@softechnics.com>.
Thanks. I got it. I forgot to mention I was running with IIS 5.0. The
addition of the following:
/ServletTest/*=ajp12
to my uriworkermap.properties file did the trick.
Jeff
-----Original Message-----
From: Michael Wentzel [mailto:Michael.Wentzel@aswethink.com]
Sent: Wednesday, August 01, 2001 12:46 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: HTTP 404 Error
> I'm stumped. I have the following directory structure/files:
>
> c:/tomcat/webapps/ServletTest/WEB-INF/web.xml
> c:/tomcat/webapps/ServletTest/WEB-INF/classes/ServletTest.class
>
> I added the following to my server.xml file:
>
> <Context path="/ServletTest"
> docBase="webapps/ServletTest"
> crossContext="false"
> debug="0"
> reloadable="true" >
> </Context>
>
> And my web.xml contains:
>
> <web-app>
> <servlet>
> <servlet-name>ServletTest</servlet-name>
> <servlet-class>ServletTest</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>ServletTest</servlet-name>
> <url-pattern>/ServletTest</url-pattern>
> </servlet-mapping>
> </web-app>
>
> If I attempt to open http://localhost/ServletTest, I get HTTP
> 404, file not
> found.
> If I attempt to open http://localhost:8080/ServletTest, I get the page
> cannot be displayed.
To get your desired results you can either change your server.xml to be
<Context path="/"
docBase="webapps/ServletTest"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
where the important thing to note is the path, or you can change the request
to be http://localhost:8080/ServletTest/ServletTest.
---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com