Hi,
i am trying to access a message-resource, that holds my error messages.
Since i have two message resources, i need to give them an id to identify
them. This is how my struts-config.xml looks like:
<!-- ==== Message Resources Definitions -->
<message-resources key="application"
parameter="resources.ApplicationResources" />
<message-resources key="errors"
parameter="resources.ApplicationErrors" />
Using them in the jsp-Page is no problem at all, e.g.:
<bean:message bundle="application" key="application.text.login.account"/>
But when i try to retrieve a key in the appropriate ActionForm-class, i get
the well known "Cannot find message resources under key
org.apache.struts.action.MESSAGE" error. How come? Here is an excerpt of my
ActionForm:
ActionErrors errors = new ActionErrors();
if( ( null == this.accountname ) || ( 1 > this.accountname.length() ) )
errors.add( "accountname", new ActionError(
"application.text.login.account" ) );
I checked the spelling, i moved the resource files around within my
catalouges, but it just won't work.
Is there a way to specify the bundle to use, when trying to retrieve a
message from the ActionForm class?
Thanx in advance,
Dominique
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]