// loginURL = SystemCfg.getValueByKey(SystemCfg.LOGINURL);//
// paramMap.get("noLoginDefaultUrl");
// notFilter = notFilters.split(",");
// uriPermission = (IURIPermission)
// IntegrationFactory.INSTANCE.getImp("tor.integration.permissionURIFilter");
InitOperations init = new InitOperations();
try {
FilterHostConfig config = new FilterHostConfig(filterConfig);
init.initLogging(config);
/**
* 定制struts.xml目录
*/
String path = filterConfig.getServletContext().getRealPath("");
Map<String, String> params = new HashMap<String, String>();
for (Iterator<String> e = config.getInitParameterNames(); e
.hasNext();) {
String name = e.next();
String value = filterConfig.getInitParameter(name);
if ("config".equals(name)) {
String[] values = value.split(",");
StringBuilder builder = new StringBuilder(1024);
for (String v : values) {
File file = new File(v);
if (file.getParent() != null) {
builder.append(path + v + ",");
} else {
builder.append(v + ",");
}
}
if (builder.length() > 0) {
builder.setLength(builder.length() - 1);
}
value = builder.toString();
}
params.put(name, value);
}
Dispatcher dispatcher = new Dispatcher(filterConfig
.getServletContext(), params);
dispatcher.init();
init.initStaticContentLoader(config, dispatcher);
/*
* prepare = new PrepareOperations(filterConfig.getServletContext(),
* dispatcher); execute = new
* ExecuteOperations(filterConfig.getServletContext(), dispatcher);
* this.excludedPatterns =
* init.buildExcludedPatternsList(dispatcher);
*
* postInit(dispatcher, filterConfig);
*/
} finally {
init.cleanup();
}
}