You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Banks <mb...@progress.com> on 2004/07/20 16:15:40 UTC

Embedded Tomcat with no war or webapps

I have successfully embedded Tomcat 5 into an application,
but I would like to be able to load servlets without using
a .war file or a webapps directory and no web.xml file.

In Jetty I can do the following:

        ServletHolder holder = handler.addServlet(
            "MYSERVLET", "/myservlet/*", MyServlet.class.getName() );
        holder.setInitParameter( "ParameterA", "/usr/local/dir" );
        holder.setInitParameter( "ParameterB", "42" );

Is there any way to do the same with Tomcat?



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org