struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Theodosios Paschalidis" <theo...@hotmail.com>
Subject (Newbie) Separating Client From Server side errors
Date Tue, 16 Mar 2004 17:38:46 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message