Hi Scal,

> I have a servlet called "myServlet"
> and i have defined  a context "foo"
>
> How i can access to this servlet whitout "servlet" in the url ->
> http://locahost/foo/servlet/myServlet

Try doing this in your apps web.xml (in the etc dir??).

<servlet>
   <servlet-name>
       myServlet
   </servlet-name>
   <description>
       No description as yet.
   </description>
   <servlet-class>
      SomeFoolServlet
   </servlet-class>
</servlet>
<servlet-mapping>
   <servlet-name>myServlet</servlet-name>
   <url-pattern>/myServlet</url-pattern>
</servlet-mapping>

This works for me - doing this it seems you can get TomCat to deal with
Servlets ANYWHERE.

Someone please tell me if there is something wrong with this or if I have
missed some vital point
(if you have the time...).

> I will prefer to access it with http://localhost/foo/myServlet.

If you do the above this is exactly what will  happen.

Miles

Reply via email to