first commit
This commit is contained in:
22
hrmsEjb/org/apache/struts/config/ActionMappingFactory.java
Normal file
22
hrmsEjb/org/apache/struts/config/ActionMappingFactory.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.apache.struts.config;
|
||||
|
||||
import org.apache.commons.digester.AbstractObjectCreationFactory;
|
||||
import org.apache.struts.util.RequestUtils;
|
||||
import org.xml.sax.Attributes;
|
||||
|
||||
final class ActionMappingFactory extends AbstractObjectCreationFactory {
|
||||
public Object createObject(Attributes attributes) {
|
||||
String className = attributes.getValue("className");
|
||||
if (className == null) {
|
||||
ModuleConfig mc = (ModuleConfig)this.digester.peek();
|
||||
className = mc.getActionMappingClass();
|
||||
}
|
||||
Object actionMapping = null;
|
||||
try {
|
||||
actionMapping = RequestUtils.applicationInstance(className);
|
||||
} catch (Exception e) {
|
||||
this.digester.getLogger().error("ActionMappingFactory.createObject: ", e);
|
||||
}
|
||||
return actionMapping;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user