void initWeb(WebModule web)
{
String webUri = web.getWebURI();
String contextUrl = web.getContextRoot();
Path path = getRootDirectory().lookup(webUri);
Path archivePath = null;
if (contextUrl == null)
contextUrl = webUri;
WebAppController controller = null;
if (webUri.endsWith(".war")) {
// server/2a16
String name = webUri.substring(0, webUri.length() - 4);
int p = name.lastIndexOf('/');
if (p > 0)
name = name.substring(p + 1);
// XXX:
if (contextUrl.equals(""))
contextUrl = "/" + name;
if (contextUrl.endsWith(".war"))
contextUrl = contextUrl.substring(0, contextUrl.length() - 4);
Path expandPath = _webappsPath;
try {
expandPath.mkdirs();
} catch (Exception e) {
log.log(Level.WARNING, e.toString(), e);
}
archivePath = path;
path = expandPath.lookup(name);
} else {
// server/2a15
if (contextUrl.equals("")) {
String name = webUri;
int p = name.lastIndexOf('/');