ResourceBundle to load a subsequent file in addition?

R

RVic

I am internationalizing a Spring MVC web app, and my question pertains to the work in the jsps, specifically the fmt.tld library:

<%@ taglib prefix="fmt" uri="/WEB-INF/tld/fmt.tld"%>

Which I use to internationalize strings converting say:
<input type="submit" name="submit" value="login" />
to:
<input type="submit" name="submit" value="<fmt:message key='Form.login' />"

All that works fine and I have used this same methos in other web applications. However, being a Spring MVC app, there are places where there is code such as:

<spring:hasBindErrors name="employee">
<ul id="errors">
<c:forEach var="err" items="${errors.allErrors}">
<li><fmt:message key="${err.code}" arguments="${err..arguments[0]}"/></li>
</c:forEach>
</ul>
</spring:hasBindErrors>

Where when invoked, generate:

org.apache.jasper.JasperException: /WEB-INF/jsp/login.jsp(62,9) Attribute arguments invalid for tag message according to TLD
referring to the message key="${err.code}" in the above snippet.

I believe this is because originally, a resource bundle was loaded, but nowthe resource bundle of the i18n keys of mine are overwriting it. Does thissound correct? I am using ResourceBundle.getBundle() to load my resource bundle, which must be overwriting the Spring MVC bundle. How can I fix this?Thanks, RVic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top