You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zsolt Horvath <ho...@mail.tiszanet.hu> on 2001/04/11 16:30:45 UTC

Servlet registration

Hi !

How could I register my own servlets into TomCat ??

I put them into the %TOMCAT_HOME%/webapps/myapp/Web-inf/classes directory. After I create a web.xml file in the %TOMCAT_HOME%/webapps/myapp directory. The web.xml file contains this:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>

    <display-name> Web Application</display-name>

    <servlet>
      <servlet-name>Servlet1</servlet-name>
      <servlet-class>Servlet1</servlet-class>
    </servlet>

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

</web-app>

And I restarted the tomcat, but it doesn`t work ! What`s wrong? 
Please help for me: horzsolt@mail.tiszanet.hu