Marco M wrote:

> hi all,
>         i have tomcat 3.0...
> i want to run the servlet  of the package Mypackage called MyServlet
> MyPackage.MyServlet
>
> i want to run with the name /marco
>
> how can i configure the web.xml??
>
> i put
> <servlet>
> <servlet-name>TrialServlet</servlet-name>
> <servlet-class>MyPackage.MyServlet</servlet-class>
> </servlet>
> <servlet-mapping>
>    <servlet-name>
>          TrialServlet
>    </servlet-name>
>    <url-mapping>
>         /marco
>    </url-mapping>
> </servlet-mapping>
>

This will work a lot better if you use <url-pattern> instead of <url-mapping>, as
the spec requires:

    <servlet-mapping>
        <servlet-name>TrialServlet</servlet-name>
        <url-pattern>/marco</url-pattern>
    </servlet-mapping>

You might also want to download the most recent release candidate (or final release
when available) of Tomcat 3.1 -- there have been many bug fixes, some of them in
the mapping area.

>
> sorry for bothering u
> anyone can help me?
> regards
>         marco
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to