You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/04/07 06:35:29 UTC
DO NOT REPLY [Bug 7807] New: -
Without "key" attribute, "message-resources" element doesn't work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7807>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7807
Without "key" attribute, "message-resources" element doesn't work
Summary: Without "key" attribute, "message-resources" element
doesn't work
Product: Struts
Version: Nightly Build
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: dmkarr@earthlink.net
I have a Struts application that works under 1.1b2. However, after building
Struts and Commons directly from source, I find that I get an exception: "Cannot
find message resources under key org.apache.struts.action.MESSAGE".
I've boiled this down to the following fact: The initialization value of
"MessageResourcesConfig.key" was changed from "Action.MESSAGES_KEY" (in 1.1.b2)
to "null" in the latest in CVS. This was apparently done by Craig on 3/23,
apparently to ensure the class is serializable.
In both scenarios (using 1.1b2 and CVS latest), the
"MessageResourcesConfig.setKey()" method is never called, so the default will be
used.
When, while stepping through the Digester, we get to
"ApplicationConfig.addMessageResourcesConfig()", the value of "key" is used as
the HashMap key. In 1.1b2, this ends up using
"org.apache.struts.action.MESSAGE" (the value of the constant
"Action.MESSAGES_KEY". However, in CVS latest, this key value ends up being
null, which doesn't work very well. Other code apparently expects it to be
under the "org.apache.struts.action.MESSAGE" key.
I've been able to work around this in CVS latest by adding an attribute to my
"message-resources" element, setting "key" to "org.apache.struts.action.MESSAGE".
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>