There's a folder named ROOT in your webapp directory. Put your servlet into the classes folder under WEB-INF and then replace the DD with yours (actually not needed just to run it).
Hope this helps! Markus On tisdag, juni 11, 2002, at 11:34 , Jean-Luc BEAUDET wrote: > "Thébault, Médérick" a écrit : > >> Thanx for the answers, It helps the debate but... >> >> I already deployed my servlet as mentionned in the documentation >> (servlet path is webapps/myservlet to act as in webapps/examples). >> Web.xml is quite simple as nothing is set in it. See below : >> >> <!DOCTYPE web-app >> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >> "http://java.sun.com/dtd/web-app_2_3.dtd"> >> <web-app> >> </web-app> >> >> But I still need to enter localhost/mypath/servlet/myservlet to access >> it. >> >> So Jean-Luc, I think I do not need to try your advice or am I completly >> wrong and missing something essential? >> >> And Markus, what do you mean by ROOT context? Setting ROOT in >> conf/server.xml as /mypath/servlet will solve the case? >> >> Thanx in advance, >> >> Cheers. >> >> Med >> >> -----Message d'origine----- >> De : Jean-Luc BEAUDET [mailto:[EMAIL PROTECTED]] >> Envoyé : mardi 11 juin 2002 10:48 >> À : Tomcat Users List >> Objet : Re: Tomcat and servlet >> >> "Marek, Tomas" a écrit : >> >>> Could give more details, please. >>> >>> tom >>> >>> -----Original Message----- >>> From: Markus Kirsten [mailto:[EMAIL PROTECTED]] >>> Sent: Tuesday, June 11, 2002 10:36 AM >>> To: Tomcat Users List >>> Subject: Re: Tomcat and servlet >>> >>> Hi Med, >>> Deploy your servlet in the ROOT context instead. >>> >>> Markus >>> >>> On tisdag, juni 11, 2002, at 10:08 , Thébault, Médérick wrote: >>> >>>> Hi again, >>>> >>>> I would like to change the URL of my servlet. >>>> >>>> It can be access thru "http://localhost/servlet/MyServlet" but I >> would >>>> like to avoid "servlet" part. >>>> >>>> In every example that I saw, the "servlet" part was always in. Is >> there >>>> a way to set up something like alias? >>>> >>>> Thanx >>>> >>>> Med >>>> >>>> -- >>>> To unsubscribe, e-mail: <mailto:tomcat-user- >>>> [EMAIL PROTECTED]> >>>> For additional commands, e-mail: <mailto:tomcat-user- >>>> [EMAIL PROTECTED]> >>>> >>> >>> -- >>> To unsubscribe, e-mail: >>> <mailto:[EMAIL PROTECTED]> >>> For additional commands, e-mail: >>> <mailto:[EMAIL PROTECTED]> >>> >>> -- >>> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >>> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> >> Well, >> >> The other way is to simply Deploy your own servlet zone and add a >> Your_Zone/WEB-INF/web.xml >> to bypass the default web.xml responsible of this mapping... >> >> Hope this help. >> >> Jean-Luc :O) >> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> >> -- >> To unsubscribe, e-mail: <mailto:tomcat-user- >> [EMAIL PROTECTED]> >> For additional commands, e-mail: <mailto:tomcat-user- >> [EMAIL PROTECTED]> > > Well... > > As your web.xml is empty, no new directives can bypass the default > one... > > Try to add smth like: > > ../.. > > <servlet> > <servlet-name>MyServlet</servlet-name> > <servlet-class>MyServlet</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>MyServlet</servlet-name> > <url-pattern>/MyServlet</url-pattern> > </servlet-mapping> > > ../.. > > This could do the trick. I think that all of this would be described in > the > servlet API 2.3. > > Hope this help. > > Jean-Luc :O) > > > > > > -- > To unsubscribe, e-mail: <mailto:tomcat-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:tomcat-user- > [EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>