User: jules_gosnell
  Date: 01/06/04 16:33:11

  Modified:    jetty/src/main/org/jboss/jetty Jetty.java
  Log:
  1. Use jboss-web.dtd from a different location (2.2.2 safe)
  2. Use Scott's SetupHandler
  
  Revision  Changes    Path
  1.7       +15 -6     contrib/jetty/src/main/org/jboss/jetty/Jetty.java
  
  Index: Jetty.java
  ===================================================================
  RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Jetty.java        2001/05/23 21:14:08     1.6
  +++ Jetty.java        2001/06/04 23:33:11     1.7
  @@ -11,6 +11,7 @@
    
   package org.jboss.jetty;
   
  +import com.mortbay.HTTP.HttpHandler;
   import com.mortbay.Jetty.Servlet.WebApplicationContext;
   import com.mortbay.Util.Code;
   import com.mortbay.Util.Log;
  @@ -84,7 +85,7 @@
       URL 
stdWeb=findResourceInJar("com.mortbay.HTTP.HttpServer","com/mortbay/Jetty/Servlet/web.dtd");
       _resolver.put("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", stdWeb);
       
  -    URL 
jbossWeb=findResourceInJar("org.jboss.web.AbstractWebContainer","org/jboss/metadata/jboss-web.dtd");
  +    URL jbossWeb=findResourceInJar("org.jboss.jetty.JettyService","jboss-web.dtd");
       _resolver.put("-//jBoss//DTD Web Application 2.2//EN", jbossWeb);
     }
   
  @@ -184,8 +185,9 @@
   
         // Use the same ClassLoader as JBoss - this allows optimisation
         // of calls to EJBs...
  -      app.setClassLoader(Thread.currentThread().getContextClassLoader());
  -      wa.setClassLoader(Thread.currentThread().getContextClassLoader());
  +      ClassLoader cl=Thread.currentThread().getContextClassLoader();
  +      app.setClassLoader(cl);
  +      wa.setClassLoader(cl);
   
         app.initialize(warUrl+(warUrl.endsWith("/")?"":"/"),
                     getWebDefault(),
  @@ -215,15 +217,22 @@
         {
        Log.event("no jboss-web.xml found");
         }
  -      
  +
  +/*
         // the latest..
         descriptorParser.parseWebAppDescriptors(wa.getClassLoader(),
                                              wa.getWebApp(),
                                              wa.getJbossWeb());
  -
  +*/
  +      // Add a handler to perform the JBoss integration during start()
  +      HttpHandler handler = new SetupHandler(descriptorParser, wa);
  +      app.addHandler(handler);
         // finally - start the WebApp...
         app.start();
  -      
  +      // Remove the handler
  +      handler.stop();
  +      app.removeHandler(handler);
  +
         // keep track of deployed contexts for undeployment
         _deployed.put(warUrl, app);
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to