This does look strange - its almost as if the message has been resolved
twice and the second time it can't find "userid is a required value" as a
key and so formatting it in the standard "???localeKey.messageKey???" format
I don't have time to help you - I'm away now for a few days, but the only
thing I can suggest is to turn logging on in "TRACE" mode for
PropertyMessagesResources - it outputs quite a bit of debugging info, which
might shed more light on this.
On your bean:write problem, it would be helpful to include any exception
from the logs.
Also was your app working OK in the same environment using Struts 1.2.6 or
Struts 1.2.4?
Niall
----- Original Message -----
From: "Tony Dahbura" <[EMAIL PROTECTED]>
Sent: Thursday, June 02, 2005 2:08 AM
> I have a peculiar problem cropping up with Struts 1.2.7...
>
> When I add an actionError to using my form bean and then go to display
> it in the html jsp page I get the following:
>
> * ???en_US.userid is a required value.???
> * ???en_US.password is a required value.???
>
> My struts-config.xml file looks like this for the message resources:
> <message-resources null="false"
> parameter="tonyapp.ApplicationMessageResources"/>
>
> If I turn the null to true I get nothing rendered-the
> ApplicationMessageResources file is in the proper location and moving it
> results in the message not being displayed (as a test). The HTML
> elements that are attempting to output the values are:
> <logic:messagesPresent>
> <ul>
> <html:messages id="errmsgs">
> <li><bean:message name="errmsgs"/></li>
> </html:messages>
> </ul>
> </logic:messagesPresent>
>
> And finally the loginForm java code that is doing this is at:
> if (getUsername() == null || getUsername().length() < 1) {
> errors.add( ActionMessages.GLOBAL_MESSAGE, new
> ActionMessage("global.required", "userid" ) );
> }
> if (getPassword() == null || getPassword().length() < 1) {
> errors.add( ActionMessages.GLOBAL_MESSAGE, new
> ActionMessage("global.required", "password") );
> }
>
> The properties file looks like this:
> global.required={0} is a required value.
>
> I am developing with Eclipse and using tomcat 5.5 with jdk 1.5. This is
> baffling to me as to why it is prepending the en_US to the value of the
> key after it looks it up. I actually get the message and the
> substitution but somehow the en_US gets put in and it flags an error
> that it cannot find the message (indicated by the ???).
>
> On another note I have had quite a bit of difficulty using the
> bean:write tags with bean properties that do not return Strings...Some
> of my beans return integers and the bean:write tag just fails and causes
> the rest of the page after the failure to not even render....Not sure if
> it is something with this particular library or not..
>
> Any help would be very appreciated. I looked through the release notes
> on the new struts 1.2.7 and did not see any fixes....
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]