Can't get errors to display with <html:errors>
I'm using the sample app in Chps. 19-20 of the Beg. JSP Web Dev. book. I have the application working, but can't get my form error messages to display properly.
I have the <html:errors> line in my .jsp pages and am creating a new ActionError whenever something goes wrong. The ActionError is working properly, but I must be missing something that's breaking this.
Can anyone lend a hand? Here's what I have:
web.xml:
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
ApplicationResources.properties:
error.incorrect.passwords=Passwords do not match
MyEditAction:
} catch (Throwable e) {
e.printStackTrace();
ActionError error = new ActionError(e.getMessage());
errors.add(ActionErrors.GLOBAL_ERROR,error);
}
saveErrors(request,errors);
return new ActionForward(mapping.getInput());
DisplayPage.jsp:
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>
<%@ taglib uri="/logic" prefix="logic" %>
<%@ taglib uri="/template" prefix="template" %>
<br/>
<html:errors/>
<br/>
Can anyone see what I'm missing?
Thanks in advance?
Mike
|