struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sgarlata Matt" <sgarlata_m...@bah.com>
Subject Re: Accessing action error problem
Date Sat, 27 Sep 2003 16:42:19 GMT
You can use the attached JSPs to display all the attributes in the request.
Just look for the attribute that stores the errors.  In general when I was
starting with Struts I found the attached JSPs very helpful because you can
see the types of information Struts stores for you and where it is stored.
Also, if you look at the Globals class the locations for many of these
attributes are recorded there.  I just find it easier to look at the actual
attributes in the request using the attached JSPs rather than hunting
through the javadoc of the Globals class.

Matt
----- Original Message ----- 
From: "Pete Serafin" <pserafin@hcrnetwork.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 1:32 PM
Subject: Accessing action error problem


> Im am trying to determine a way to find out if an ActionError exists in my
request.  I create an error in my action class as follows:
>
> ActionErrors errors = new ActionErrors();
> errors.add( "startDate",new
ActionError("error.form.requiredField.startDate") );
> saveErrors( request, errors );
>
> I can access the error using the <html:errors /> tag, but all I actuallt
want to do is check that the startDate error is not null. How can I try to
grab this object from the HttpServletRequest object?
>
> The whole point is to execute some logic that hides some html if an error
exists.  Any suggestions?
>
> Pete Serafin
> HealthCare Recruiters International
>

Mime
View raw message