resourcebundle - JSF 1.2 Application.getMessageBundle() returns null -
i'm using spring 2.5 jsf 1.2, on tomcat 6.0.13.
in 1 part of code, i'm trying load resourcebundle using following approach:
resourcebundle.getbundle(context.getapplication().getmessagebundle(), locale.en);
the problem getmessagebundle() method returns null. used work jsf 1.1. have idea problem?
for i'm going hardcode bundle name, prefer if configuration data placed inside faces-config.
resource bundle set following:
<application> <locale-config> <default-locale>en</default-locale> </locale-config> <resource-bundle> <base-name>org.mysite.messagebundle</base-name> <var>msgs</var> </resource-bundle> </application>
the getmessagebundle()
returns value of <message-bundle>
entry in faces-config.xml
, not <resource-bundle>
entry.
its value not avaliable jsf 1.2 api. have specify yourself.
resourcebundle bundle = context.getapplication().getresourcebundle(context, "org.mysite.messagebundle");
the <message-bundle>
validation/conversion messages. you've actually used in jsf 1.1.
Comments
Post a Comment