Consider this situation, which is not uncommon.
- I need images that vary by locale
Resource handling, as described in section 2.6, makes it impossible to vary the
In order to have images vary by locale, it is necessary to add keys
javax.faces.resource.localePrefix into the the application's message bundle for
each locale. Once that has been done, the prefix is used for ALL resource lookups.
1) It forces unnecessary duplication of resources. (I now have to put the SAME
2) The spec is not clear what happens when a resource is obtained from a
component library. If the locale prefix is also prepended in that case, it is
possible (even likely) that the library will break.
Suggested fix: Abolish the javax.faces.resource.localePrefix approach. Instead,
get the actual application locale, and look for resources at
language_country_variant, language_country, language, and no prefix, just like a