You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Parker <bp...@cloudnet.com> on 2000/07/16 01:10:52 UTC

404 error - What am I doing wrong?

Hi,
TIA for helping me.  I am running TomCat 3.1 on RH 6.1 Linux.  I can run all
of the example servlets successfully.  But I am experimenting with running
servlets located outside of the "jakarta-tomcat" tree.

Here is my configuration for an application called "matchmaker":

[Brian@servy Brian]$ cd /home/Brian
[Brian@servy Brian]$ find matchmaker
matchmaker
matchmaker/webapp
matchmaker/webapp/WEB-INF
matchmaker/webapp/WEB-INF/web.xml
matchmaker/webapp/WEB-INF/classes
matchmaker/webapp/WEB-INF/classes/IsItWorking.class
matchmaker/webapp/WEB-INF/lib
matchmaker/webapp/lib

I have added the following entry to $TOMCAT_HOME/conf/server.xml:

       <Context path="/match" docBase="/home/Brian/matchmaker/webapp"
debug="9" reloadable="true" >
       </Context>

My minimalist web.xml file (/home/Brian/matchmaker/webapp/WEB-INF/web.xml)
looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN"
     "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
     <servlet>
         <servlet-name>
             IsItWorking
         </servlet-name>
         <servlet-class>
              IsItWorking
         </servlet-class>
     </servlet>
</web-app>

When I access http://localhost:8080/match/IsItWorking , I get a 404 - not
found.  It is probably something simple.

Kind regards,

Brian


Re: 404 error - What am I doing wrong?

Posted by Brian Parker <bp...@cloudnet.com>.
> Hi Brian,
>
> > matchmaker/webapp/WEB-INF/lib
> > matchmaker/webapp/lib
>
> Why two lib directories?  This isn't the problem, just curious ;)
>
oops that was a mistake!

> I *believe* you access it by /match/servlet/IsItWorking.  I don't have
much

That was it, thank you!


RE: 404 error - What am I doing wrong?

Posted by "Rob S." <rs...@home.com>.
Hi Brian,

> matchmaker/webapp/WEB-INF/lib
> matchmaker/webapp/lib

Why two lib directories?  This isn't the problem, just curious ;)

> When I access http://localhost:8080/match/IsItWorking , I get a 404 - not
> found.  It is probably something simple.

I *believe* you access it by /match/servlet/IsItWorking.  I don't have much
experience with servlets outside of JSPs eventually being servlets.  From
reading the occasional servlet email on this list, I think that is the
proper way you access them.

Hope this helps(ed)!

- r

p.s. I've attached an email I saved from the list entitled, "getting started
with servlets".

RE: 404 error - What am I doing wrong?

Posted by Toby Piper <tp...@CompCraft.com>.
You need to make sure that you update your uriworkermap.properties file too and
then you MAY have to reboot. I have to under NT and IIS, however that may be
only an NT and/or IIS problem.

> -----Original Message-----
> From: Brian Parker [mailto:bparker@cloudnet.com]
> Sent: Saturday, July 15, 2000 4:11 PM
> To: tomcat-user@jakarta.apache.org
> Subject: 404 error - What am I doing wrong?
>
>
> Hi,
> TIA for helping me.  I am running TomCat 3.1 on RH 6.1 Linux.  I can run all
> of the example servlets successfully.  But I am experimenting with running
> servlets located outside of the "jakarta-tomcat" tree.
>
> Here is my configuration for an application called "matchmaker":
>
> [Brian@servy Brian]$ cd /home/Brian
> [Brian@servy Brian]$ find matchmaker
> matchmaker
> matchmaker/webapp
> matchmaker/webapp/WEB-INF
> matchmaker/webapp/WEB-INF/web.xml
> matchmaker/webapp/WEB-INF/classes
> matchmaker/webapp/WEB-INF/classes/IsItWorking.class
> matchmaker/webapp/WEB-INF/lib
> matchmaker/webapp/lib
>
> I have added the following entry to $TOMCAT_HOME/conf/server.xml:
>
>        <Context path="/match" docBase="/home/Brian/matchmaker/webapp"
> debug="9" reloadable="true" >
>        </Context>
>
> My minimalist web.xml file (/home/Brian/matchmaker/webapp/WEB-INF/web.xml)
> looks like:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> 2.2//EN"
>      "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
> <web-app>
>      <servlet>
>          <servlet-name>
>              IsItWorking
>          </servlet-name>
>          <servlet-class>
>               IsItWorking
>          </servlet-class>
>      </servlet>
> </web-app>
>
> When I access http://localhost:8080/match/IsItWorking , I get a 404 - not
> found.  It is probably something simple.
>
> Kind regards,
>
> Brian
>
>