You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by George Metz <ge...@fedex.com> on 2003/01/07 22:35:09 UTC

new user: servlets dont run in new apps

what simple thing am i missing ?
(probably something in the documentation, but i havent
found it so far)

PROBLEM:
cannot get servlets to run in a NEW webapp. the ones that
come with tomcat work ok, except for the sample servlet in the
Developer's Guide. this built-in one doesnt run either:

http://127.0.0.1:8080/tomcat-docs/appdev/sample/web/hello
(gives: HTTP Status 404
  The requested resource (/tomcat-docs/appdev/sample/web/hello) is not
available

As for my new apps:
- a simple html page in webapps\george runs ok

- a tomcat example jsp i modified and dropped into webapps/george/Jsp
runs fine.
   called thusly:
 http://127.0.0.1:8080/george/Jsp/geo_hello.jsp?yakittyyak

- i successfully copied/renamed/modified/compiled and ran a servlet
under
 examples\WEB-INF\classes,  even referenced it successfully in
 examples\WEB-INF\web.xml like so :

    <servlet>
        <servlet-name>georghe</servlet-name>
        <servlet-class>GeorgeHello</servlet-class>
    </servlet>

 works like a champ when called thusly:
http://127.0.0.1:8080/examples/servlet/GeorgeHello?username=CletusT
or
http://127.0.0.1:8080/examples/servlet/georghe?username=CletusT

 BUT same GeorgeHello class servlet placed under
webapps\george\WEB-INF\classes
 wont run. gives the dreaded 404

HTTP Status 404
The requested resource (/george/servlet/GeorgeHello) is not available


Have same problem with David Flanagan's (OReilly) javaexamples2
app (installed it from a .war file, tomcat extracted it).
JSPs run fine, servlets dont.

(george app directories were set up manually, but carefully.
 have checked permissions/properties on the directories several
 times. look the same as the examples app to me. )


thanks!
George