You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Soefara Redzuan <so...@hotmail.com> on 2002/03/14 07:26:08 UTC

a better way to deploy servlets on tomcat ?

Sorry for another question but is there an easier way to load servlets into 
Tomcat than the following process which I'm using now.

First, I write my servlet .java file for example in
webapps/<myapp>/WEB-INF/classes/myservlet.java

Second, I compile it.

Third, I add the servlet and servlet mapping to
webapps/<myapp>/WEB-INF/web.xml

<web-app>
    <servlet>
        <servlet-name>testServlet</servlet-name>
        <servlet-class>testServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>
            testServlet
        </servlet-name>
        <url-pattern>
            /testServlet
        </url-pattern>
    </servlet-mapping>
</web-app>

Finally, I restart Tomcat.

Do I really have to add each servlet and its servlet mapping to web.xml or 
is there a way to have all servlets automatically detected and served by 
Tomcat ?  Plus is there anyway to avoid the restarting of Tomcat ?

Thank you again, Soefara


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>