User: jules_gosnell Date: 02/03/20 17:24:24 Modified: jetty/src/main/org/jboss/jetty JBossWebApplicationContext.java Log: Use David Jencks suggestion to convert an njar: into a file: to Jasper's classpath - thanks David Revision Changes Path 1.35 +19 -15 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.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- JBossWebApplicationContext.java 19 Mar 2002 19:43:11 -0000 1.34 +++ JBossWebApplicationContext.java 21 Mar 2002 01:24:24 -0000 1.35 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: JBossWebApplicationContext.java,v 1.34 2002/03/19 19:43:11 jules_gosnell Exp $ +// $Id: JBossWebApplicationContext.java,v 1.35 2002/03/21 01:24:24 jules_gosnell Exp $ // A Jetty HttpServer with the interface expected by JBoss' // J2EEDeployer... @@ -16,6 +16,7 @@ //------------------------------------------------------------------------------ +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.net.URL; @@ -181,18 +182,22 @@ { URL url=(URL)i.next(); -// if (url.getProtocol().equals("njar")) -// { -// try -// { -// URLConnection conn=url.openConnection(); -// //url=conn.getURL(); -// _log.warn("JSP CONNECTION: "+conn); -// } -// catch (IOException ignore) -// { -// } -// } + 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) + { + } + } if (!url.getProtocol().equals("file")) // tmp warning { @@ -209,8 +214,7 @@ { String tmp=res.getFile().getCanonicalPath(); // _log.info("JSP FILE: "+url+" --> "+tmp+" : "+url.getProtocol()); - if (classpath.indexOf(tmp)==-1) - classpath+=(classpath.length()==0?"":_separator)+tmp; + classpath+=(classpath.length()==0?"":_separator)+tmp; } } catch (IOException ioe)
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development