Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26245

ResourceBundle to load a subsequent file in addition?

Newsgroups comp.lang.java.programmer
Date 2013-10-09 06:49 -0700
Message-ID <6887d339-6c84-41a0-8479-0b08118b2c8c@googlegroups.com> (permalink)
Subject ResourceBundle to load a subsequent file in addition?
From RVic <rvince99@hotmail.com>

Show all headers | View raw


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 now the resource bundle of the i18n keys of mine are overwriting it. Does this sound 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

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

ResourceBundle to load a subsequent file in addition? RVic <rvince99@hotmail.com> - 2013-10-09 06:49 -0700

csiph-web