I use (training ...) Struts 1.3 to build an MVC web application. For clarity, I would like to include more than one element <message-resources>- the separation of messages into files for specific application modules.
The official Apache documentation says:
You can define one or more elements <message-resources>for your webapp; modules can define their own resource packages. Your application can use different packages at the same time, the key attribute is used to indicate the desired package.
However, when I include more than one element, the JSP raises an exception indicating that there is no message for the key:
SEVERE: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Missing message for key "label.username" in bundle "(default bundle)" for locale en_GB
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:233)
at org.apache.jsp.index_jsp._jspx_meth_bean_005fmessage_005f0(index_jsp.java:197)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:107) ~~~snip~~~
This is XML:
<struts-config>
~~~snip~~~
<message-resources parameter="resources.DefaultResource"/>
<message-resources parameter="resources.Registration"/>
</struts-config>
"" . "label.username" "DefaultResource".
.