[jboss-cvs] JBossAS SVN: r58267 - trunk/server/src/main/org/jboss/web/deployers
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Nov 11 15:43:28 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-11 15:43:26 -0500 (Sat, 11 Nov 2006)
New Revision: 58267
Modified:
trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
Log:
Update war copying to deal with jar urls
Modified: trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java 2006-11-11 20:29:34 UTC (rev 58266)
+++ trunk/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java 2006-11-11 20:43:26 UTC (rev 58267)
@@ -290,8 +290,12 @@
* the root url.
*/
String warName = unit.getName();
- if( warName.endsWith("/") == false )
+ if( warName.endsWith("/") == false
+ // Hack for jar urls being exposed
+ || warName.endsWith("!/") == true )
{
+ if( warName.startsWith("jar:") )
+ warName = warName.substring(4, warName.length()-2);
URL warURL = new URL(warName);
ServerConfig config = ServerConfigLocator.locate();
String prefix = warURL.getFile();
@@ -308,7 +312,7 @@
VirtualFile root = unit.getDeploymentContext().getRoot();
InputStream is = root.openStream();
JarUtils.unjar(is, expWarFile);
- root.close();
+ is.close();
// Indicate that an expanded URL exists
unit.addAttachment("org.jboss.web.expandedWarURL", expWarFile.toURL(), URL.class);
}
More information about the jboss-cvs-commits
mailing list