if (input == null)
throw new UnavailableException
(internal.getMessage("configMissing", config));
// Build a digester to process our configuration resource
Digester digester = new Digester();
digester.push(this);
digester.setDebug(detail);
digester.setValidating(false);
digester.addObjectCreate("action-mappings/action", mappingClass,
"className");
digester.addSetProperties("action-mappings/action");
digester.addSetNext("action-mappings/action", "addMapping",
"org.apache.struts.action.ActionMapping");
digester.addObjectCreate("action-mappings/action/forward",
forwardClass, "className");
digester.addSetProperties("action-mappings/action/forward");
digester.addSetNext("action-mappings/action/forward", "addForward",
"org.apache.struts.action.ActionForward");
digester.addSetProperty("action-mappings/action/forward/property",
"name", "value");
digester.addSetProperty("action-mappings/action/property",
"name", "value");
digester.addObjectCreate("action-mappings/forward",
forwardClass, "className");
digester.addSetProperties("action-mappings/forward");
digester.addSetNext("action-mappings/forward", "addForward",
"org.apache.struts.action.ActionForward");
digester.addSetProperty("action-mappings/forward/property",
"name", "value");
// Parse the input stream to configure our mappings
try {
digester.parse(input);
input.close();
} catch (SAXException e) {
throw new ServletException
(internal.getMessage("configParse", config), e);
}