public StrutsXmlConfigurationProvider(String filename,
boolean errorIfMissing,
ServletContext ctx) {
super(filename, errorIfMissing);
this.servletContext = ctx;
this.filename = filename;
reloadKey = "configurationReload-"+filename;
Map< String,String > dtdMappings = new HashMap< String,String >(getDtdMappings());
dtdMappings.put("-//Apache Software Foundation//DTD Struts Configuration 2.0//EN", "struts-2.0.dtd");
setDtdMappings(dtdMappings);
File file = new File(filename);
if (file.getParent() != null) {
this.baseDir = file.getParentFile();
}
}
Constructs the configuration provider Parameters:
filename - The filename to look for
errorIfMissing - If we should throw an exception if the file can't be found
ctx - Our ServletContext
|