User: jules_gosnell
  Date: 02/04/09 13:55:52

  Modified:    jetty/src/main/org/jboss/jetty
                        JBossWebApplicationContext.java
  Log:
  move code for forcing unpacking of njars elsewhere
  
  Revision  Changes    Path
  1.36      +5 -51     
contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java
  
  Index: JBossWebApplicationContext.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- JBossWebApplicationContext.java   21 Mar 2002 01:24:24 -0000      1.35
  +++ JBossWebApplicationContext.java   9 Apr 2002 20:55:52 -0000       1.36
  @@ -5,7 +5,7 @@
    * See terms of license at gnu.org.
    */
   
  -// $Id: JBossWebApplicationContext.java,v 1.35 2002/03/21 01:24:24 jules_gosnell 
Exp $
  +// $Id: JBossWebApplicationContext.java,v 1.36 2002/04/09 20:55:52 jules_gosnell 
Exp $
   
   // A Jetty HttpServer with the interface expected by JBoss'
   // J2EEDeployer...
  @@ -174,30 +174,15 @@
     public String
       getFileClassPath()
       {
  -      List List=new ArrayList();
  -      getFileClassPath(getClassLoader(), List);
  +      List list=new ArrayList();
  +      getFileClassPath(getClassLoader(), list);
   
         String classpath="";
  -      for (Iterator i=List.iterator(); i.hasNext();)
  +      for (Iterator i=list.iterator(); i.hasNext();)
         {
        URL url=(URL)i.next();
   
  -     if (url.getProtocol().equals("njar"))
  -     {
  -       try
  -       {
  -         // force the resource we are after to be unpacked - tmp hack - thanks 
David Jencks!
  -         URL dummy=new URL("njar:"+url.toString()+"^"+"/dummy.jar");
  -         String tmp=dummy.openConnection().getURL().toString();
  -         tmp=tmp.substring("jar:".length());
  -         tmp=tmp.substring(0, tmp.length()-"!/dummy.jar".length());
  -         _log.info("converting "+url+" -> "+tmp);
  -         url=new URL(tmp);
  -       }
  -       catch (Exception ignore)
  -       {
  -       }
  -     }
  +     url=org.jboss.net.protocol.njar.Handler.njarToFile(url);
   
        if (!url.getProtocol().equals("file")) // tmp warning
        {
  @@ -256,37 +241,6 @@
   
         getFileClassPath(cl.getParent(), list);
       }
  -
  -//   public String
  -//     getFileClassPath(ClassLoader cl)
  -//     {
  -//       String classpath="";
  -//       String[] entries=_jetty.getCompileClasspath(cl);
  -//
  -//       for (int i=0; i<entries.length; i++)
  -//       {
  -//   try
  -//   {
  -//     Resource res = Resource.newResource (entries[i]);
  -//     if (res.getFile()==null)
  -//       _log.warn("bad classpath entry: "+entries[i]);
  -//     else
  -//     {
  -//       String tmp=res.getFile().getCanonicalPath();
  -//       classpath+=(classpath.length()==0?"":_separator)+tmp;
  -//     }
  -//   }
  -//   catch (IOException ioe)
  -//   {
  -//     _log.warn ("JSP Classpath is damaged, can't convert path for :"+entries[i], 
ioe);
  -//   }
  -//       }
  -//
  -//       if (_log.isDebugEnabled())
  -//   _log.debug("JSP classpath: "+classpath);
  -//
  -//       return classpath;
  -//     }
   
     // given a resource name, find the jar file that contains that resource...
     protected String
  
  
  

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

Reply via email to