* @throws IllegalStateException
* If ActionContext is not a subclass of ActionBase
*/
protected ActionForm findOrCreateForm(ActionContext ctx, String effectiveFormName, String effectiveScope)
throws IllegalAccessException, InstantiationException {
ActionContextBase context;
try {
context = (ActionContextBase) ctx;
} catch (ClassCastException e) {
throw new IllegalStateException("ActionContext [" + ctx + "]" + " must be subclass of ActionContextBase");
}
ActionForm form = context.findOrCreateActionForm(effectiveFormName, effectiveScope);
if (form == null) {
throw new IllegalArgumentException("No form found under scope [" + effectiveScope + "] and formName ["
+ effectiveFormName + "]");
}