> I put a package called FTPExplorer.jar under 
> /admin/web-inf/lib containing
> the servlet named
> com.company.ftpexplorer.FTPExplorerServlet.class
> 
> When calling the servlet with following URL:
> http://localhost:8080/admin/servlet/com.company.ftpexplorer.FT
> PExplorerServl
> et
> the servlet works ok.
> 
> I've defined the following <servlet> element on the main 
> tomcat web.xml
> 
>       <servlet>
>               <servlet-name>
>             controller
>         </servlet-name>
>               <servlet-class>
>             com.company.ftpexplorer.FTPExplorerServlet
>         </servlet-class>
>       </servlet>
> 
> When trying to call the servlet with either URLs:
> http://localhost:8080/controller
> http://localhost:8080/admin/servlet/controller
> 
> Tomcat can't find the servlet ( 404 )
> 
> What is wrong ?

Creating a servlet name does not create the corresponding
servlet mapping, such as:

<servlet-mapping>
        <servlet-name>
                controller
        </servlet-name>
        <url-pattern>
                /controller
        </url-pattern>
</servlet-mapping>

then use http://localhost:8080/controller (if you're in the root
context that is).

---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com

Reply via email to