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

    Migrate from Jetty to Tomcat: Dynamic contexts

    Torsten Terp Newbie


      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">
       <Set name="ResourceBase">C:/MyResource/*</Set>
       <Call name="addHandler">
       <Arg><New class="org.mortbay.http.handler.ResourceHandler"/></Arg>
       <Call name="start" />

      How is this done in embedded Tomcat?