// Look up the application module configuration information we need
ModuleConfig moduleConfig = lookupModuleConfig(context);
// Look up the ActionConfig we are processing
String action = getAction();
ActionConfig actionConfig = moduleConfig.findActionConfig(action);
if (actionConfig == null) {
throw new IllegalArgumentException("Cannot find action '" +
action + "' configuration");
}
// Does this ActionConfig specify a form bean?
String name = actionConfig.getName();
if (name == null) {
return;
}
// Look up the FormBeanConfig we are processing
FormBeanConfig fbConfig = moduleConfig.findFormBeanConfig(name);
if (fbConfig == null) {
throw new IllegalArgumentException("Cannot find form bean '" +
name + "' configuration");
}
// Does a usable form bean attribute already exist?
String attribute = actionConfig.getAttribute();
String scope = actionConfig.getScope();
ActionForm instance = null;
if ("request".equals(scope)) {
instance = (ActionForm)
context.getExternalContext().getRequestMap().get(attribute);
} else if ("session".equals(scope)) {