-
Jan 15th, 2007, 08:27 PM
#1
ResourceBundleMessageSource multi properties file, same key
Hi all,
i'm using ResourceBundleMessageSource to load all my properties file, using :
<property name="basenames">
<list>
<value>aFileProp</value>
<value>bFileProp</value>
</list>
</property>
- in my aFileProp.properties i got :
name_display_flag=true
- and in my bFileProp.properties i also got :
name_display_flag=false
can i determine in my jsp page which resources file i want to use ?
for example in my a.jsp i want to use aFileProp.properties, not bFileProp.properties.
FYI : in my jsp file i use :
<spring:message code="name_display_flag" var="checkValue"/>
<c:if test="${checkValue == true}">
</c:if>
Thank you.
-
Jan 15th, 2007, 11:23 PM
#2
A single ResourceBundleMessageSource cannot support duplicate keys - they get merged at load time, with the last one winning. In theory, you could bejigger things such that you had multiple message sources and a filter to switch between them etc - but wouldn't it be simpler to disambiguate the keys?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules