-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thom,

> struts-config.xml:

This looks good.

>      request.setAttribute("sessionForm", this) ; // If I don't do this the
> form will be blank after an error.

You really shouldn't have to do this. The form bean in the session will
be called "donorBean" because of the value of the "name" attribute in
your <action> mapping in struts-config.xml.

>      request.setAttribute("errors", actionErrors) ;

You shouldn't have to do this, either. Struts should be putting this
ActionErrors object into the request for you. This is all you should need:

>      return actionErrors ;


> My validations.xml file - working partially

When you say "partially", you mean that your form is re-displayed when
validation doesn't pass, right? It's just that your errors do not show
up and the form fields are blank. I think your validation is probably
okay, but let's see.

>         <arg0 key="validation.error.firstname"/>

Do all of these properties actually exist in this file:

/WEB-INF/ErrorMessages.properties (this is where you indicated your
message resources were).

I'm not sure what is the "standard" way to do this, but I have my
message resources in my WEB-INF/classes directory, and I specify it like
this:

    <message-resources parameter="ApplicationMessages" null="false" />

You might try adding 'null="false"' to see if you start getting messages
like '???en_US.validation.error.firstname???' in your pages. If you get
these messages, it means that struts can't find your error messages, but
they are being properly generated and saved into the request.

>      <html:errors/>

This ought to print /something/. My guess is a properties file loading
problem (see above).

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUMCr9CaO5/Lv0PARAg8pAJ0ToTTuxR2wC09xbRLXrGTNKfwa7ACfUhBI
41L+o5dayknOJDxN2PrQOl8=
=T+ly
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to