By W.ZH Aug 04 2009Message Bundle +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Message Bundle in fact is the way before JSF 1.2.
As for localization, JSF allows you to specify a resource bundle in your faces-config.xml file. This will allow JSF to load the appropriate message bundles defined by the users browser. You still have to include it with loadBundle if you want to access it via JSP. JSF also allows you to mess with these resource bundles programatically. Here’s an example of the entry in your faces-config.xml file.
This will tell JSF that MessageResources.properties is the en (English) locale and to load this by default but it also tells JSF that you have a MessageResources_de.properties file that supports the German language which would be specified by the browser.
Loading it into your JSP.
String bundleName = getFacesContext().getApplication().getMessageBundle();
normally there is a function in the JSFUtil.java can do this kind of thing.
Resource Bundle +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
But from JSF 1.2, you have simple way to access the msg. You just need to define the bundle in the resource-bundle tag, then you can directly access from JSF page. Sth like this:
<resource-bundle> <var>res</var> <base-name>resources.CustomMessages</base-name> </resource-bundle>
Of coz in the backing bean,
And i guess in the backing bean, you can use the