/* 340 */ warName = warName.substring(4, warName.length() - 2);
/* */ else
/* 342 */ warName = warName.substring(4, warName.length());
/* */ }
/* 344 */ URL warURL = new URL(warName);
/* 345 */ ServerConfig config = ServerConfigLocator.locate();
/* 346 */ String prefix = warURL.getFile();
/* 347 */ int lastSlash = prefix.lastIndexOf('/');
/* 348 */ if (lastSlash > 0)
/* 349 */ prefix = prefix.substring(lastSlash + 1);
/* 350 */ int dotWar = prefix.lastIndexOf(".war");
/* 351 */ if (dotWar > 0) {
/* 352 */ prefix = prefix.substring(0, dotWar);
/* */ }
/* 354 */ File expWarFile = File.createTempFile(prefix, "-exp.war", config.getServerTempDeployDir());
/* 355 */ expWarFile.delete();
/* 356 */ if (!expWarFile.mkdir())
/* 357 */ throw new DeploymentException("Was unable to mkdir: " + expWarFile);
/* 358 */ this.log.debug("Unpacking war to: " + expWarFile);
/* 359 */ VirtualFile root = unit.getRoot();