struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Struts validation (still) (again!) (ARRGH!)
Date Sat, 06 Jan 2007 00:27:20 GMT
Hash: SHA1


Peter L. Berghold wrote:
> <message-resources parameter="org.bcdc.struts.ApplicationResources" />

Hmm... I don't usually put stuff like this in "packages" but you might
want to use slashes instead of dots. Give it a try and see...

> When the form is submitted completely blank (which should generate an
> error.. and it does) I get a popup with NOTHING IN IT but an yellow
> exclamation mark.

Try adding the 'null="false"' attribute to your <message-resources>
element: that should then give you error messages in the form
???label.body_rq??? so at least you can verify that the correct message
key is being used (you get "???" + the key + "???", along with some
locale information if that's being used).

> The conclusion I'm drawing is that the validation framework is for some
> unknown reason not finding the resource file.  Was there something the
> the validation.xml file that was supposed to point to this file or
> should it have picked it up on its own?

Your validation config should use the existing application resource
files correctly. I'm assuming you aren't using an ancient version of
anything, are you?

Also, you only have one resource bundle, right? If you have more than
one, I think you have to name them using the "key" attribute of the
<message-resources> element. For instance, I have 6 bundles, one of
which is called and has no "key". This
contains generic stuff. At some point, the single bundle was getting out
of control, so I split it up and have 6, now. Anyhow, when I did that, I
had to add a "bundle" attribute to all of the validator fields that used
message bundle keys (and whose messages were not in the generic bundle).
Just a note for future use.

Hope that helps,
- -chris

Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message