In your servlet-mapping, don't include the context name in the mapping. It is assumed.
should be: <url-pattern>/SimpleHello</url-pattern> not: <url-pattern>/testapp/SimpleHello</url-pattern> You should now be able to access it via... http://localhost/testapp/SimpleHello or http://localhost/testapp/servlet/SimpleHello (note that in this case, it is using the registered name of the servlet so it isn't mapping this against your url-pattern like above, rather, the servlet-name. Try changing the servlet-name to something totally different such as mysimpleservlet to see this more clearly) or http://localhost/testapp/servlet/myexamples.SimpleHello Jake At 08:54 PM 4/23/2002 -0700, you wrote: >I was wondering if anyone could tell me what I am doing wrong? I have >Tomcat 4.0.3 running and it seems to be working fine (can run the examples), >but I want to add my own test apps to start working with servlets. I have >started with a servlet called SimpleHello that is part of the myexamples >package. I have the information below, but I get the following error: > >The requested resource (/testapp/servlet/myexamples.SimpleHello) is not >available. > >I have also tried it with /testapp/servlet/SimpleHello, >/testapp/myexamples.SimpleHello, /testapp/SimpleHello > >Here is what I have done.... > >Added this to the server.xml: > <Context path="/testapp" docBase="testapp" debug="0" > reloadable="true" crossContext="true"> > </Context> > >Created the testapp directory under the webapps, etc. > >(directory structure) >webapps >--testapp >----WEB-INF >------classes >--------myexamples >----------SimpleHello.class > >Then added this to the web.xml file inisde the WEB-INF directory: > > <servlet> > <servlet-name>SimpleHello</servlet-name> > <servlet-class>myexamples.SimpleHello</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>SimpleHello</servlet-name> > <url-pattern>/testapp/SimpleHello</url-pattern> > </servlet-mapping> > > >Thanks in advance. > >Ken > > >-- >To unsubscribe: <mailto:[EMAIL PROTECTED]> >For additional commands: <mailto:[EMAIL PROTECTED]> >Troubles with the list: <mailto:[EMAIL PROTECTED]>
