You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Theodosios Paschalidis <th...@hotmail.com> on 2004/03/16 18:38:46 UTC
(Newbie) Separating Client From Server side errors
Hi all,
in my application I use both the validator for client side validation and server side validation. My problem is that when validation fails, I get the error reported as server side and not in a Javascript fashion.
Additionally when a validation error occurs my reset button does not work.
In my Action I have code like this
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("error.logon.invalid"));
saveErrors(request,errors);
In my JSP I try to separate those errors like this
<logic:messagesPresent>
<UL>
<logic:iterate id="errors">
<LI><bean:write name="errors"/></LI>
</logic:iterate>
</UL>
</logic:messagesPresent>
But I get this exception
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:333)
at org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:308)
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:663)
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:710)
at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:303)
What am I doing wrong here?
Thank you for your time,
Theo