// static path is not allowed
if(countExistingContextes>1 && strConfig!=null && strConfig.indexOf('{')==-1){
String text="static path ["+strConfig+"] for servlet init param [railo-web-directory] is not allowed, path must use a web-context specific placeholder.";
System.err.println(text);
throw new PageServletException(new ApplicationException(text));
}
strConfig=SystemUtil.parsePlaceHolder(strConfig,sc,configServer.getLabels());
ResourceProvider frp = ResourcesImpl.getFileResourceProvider();
Resource root = frp.getResource(ReqRspUtil.getRootPath(sc));
Resource configDir=ResourceUtil.createResource(root.getRealResource(strConfig), FileUtil.LEVEL_PARENT_FILE,FileUtil.TYPE_DIR);
if(configDir==null) {
configDir=ResourceUtil.createResource(frp.getResource(strConfig), FileUtil.LEVEL_GRAND_PARENT_FILE,FileUtil.TYPE_DIR);
}
if(configDir==null) throw new PageServletException(new ApplicationException("path ["+strConfig+"] is invalid"));
if(!configDir.exists()){
try {
configDir.createDirectory(true);
}
catch (IOException e) {}