0 Replies Latest reply on Mar 29, 2004 5:43 AM by terp

    Migrate from Jetty to Tomcat: Dynamic contexts

    terp

      Hi

      We are going to migrate our apps from embedded Jetty to embedded Tomcat in order to evaluate if a switch will not have a negative impact on performance.

      In Jetty we dynamically add Web Contexts to an app at deploy time using jetty-web.xml :

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.1//EN" "http://jetty.mortbay.org/configure_1_2.dtd">
      
      <Configure class="org.jboss.jetty.JBossWebApplicationContext">
       <Call name="getHttpServer">
       <Call name="addContext">
       <Arg>/MyResources/*</Arg>
       <Set name="ResourceBase">C:/MyResource/*</Set>
       <Call name="addHandler">
       <Arg><New class="org.mortbay.http.handler.ResourceHandler"/></Arg>
       </Call>
       <Call name="start" />
       </Call>
       </Call>
      </Configure>
      


      How is this done in embedded Tomcat?

      Thanks...
      Torsten