String primary = el.getAttribute("primary");
boolean physicalFirst = primary == null || !primary.equalsIgnoreCase("archive");
tmp = new MappingImpl(config, virtual, physical, archive, insTemp, physicalFirst, hidden, readonly, toplevel, false, false, listener, clMaxEl);
mappings.put(tmp.getVirtualLowerCase(), tmp);
if (virtual.equals("/")) {
finished = true;
// break;
}
}
}
// set default railo-server-context
if(config instanceof ConfigServer && !hasRailoServerContext) {
ApplicationListener listener = ConfigWebUtil.loadListener("modern", null);
listener.setMode(ApplicationListener.MODE_CURRENT2ROOT);
tmp = new MappingImpl(config, "/railo-server-context", "{railo-server}/context/", null, ConfigImpl.INSPECT_ONCE, true, false, true, true, false, false, listener, 100);
mappings.put(tmp.getVirtualLowerCase(), tmp);
}
}
if ( !finished ) {
if ( (config instanceof ConfigWebImpl) && ResourceUtil.isUNCPath( config.getRootDirectory().getPath() ) ) {
tmp = new MappingImpl( config, "/", config.getRootDirectory().getPath(), null, ConfigImpl.INSPECT_UNDEFINED, true, true, true, true, false, false, null );
} else {
tmp = new MappingImpl( config, "/", "/", null, ConfigImpl.INSPECT_UNDEFINED, true, true, true, true, false, false, null );
}
mappings.put( "/", tmp );
}