// Look up the application scope collections that we need
ActionMappings mappings = (ActionMappings)
pageContext.getAttribute(Action.MAPPINGS_KEY,
PageContext.APPLICATION_SCOPE);
ActionFormBeans formBeans = (ActionFormBeans)
pageContext.getAttribute(Action.FORM_BEANS_KEY,
PageContext.APPLICATION_SCOPE);
if ((mappings == null) || (formBeans == null)) {
JspException e = new JspException
(messages.getMessage("formTag.collections"));
pageContext.setAttribute(Action.EXCEPTION_KEY, e,
PageContext.REQUEST_SCOPE);
throw e;
}
// Look up the action mapping we will be submitting to
String mappingName = getActionMappingName();
ActionMapping mapping = mappings.findMapping(mappingName);
if (mapping == null) {
JspException e = new JspException
(messages.getMessage("formTag.mapping", mappingName));
pageContext.setAttribute(Action.EXCEPTION_KEY, e,
PageContext.REQUEST_SCOPE);
throw e;
}
// Look up the form bean definition
ActionFormBean formBean =
formBeans.findFormBean(mapping.getName());
if (formBean == null) {
JspException e = new JspException
(messages.getMessage("formTag.formBean", mapping.getName()));
pageContext.setAttribute(Action.EXCEPTION_KEY, e,
PageContext.REQUEST_SCOPE);