Getting bundle from java code

Bundle

If you use a bunle file SomeUI.properties in resource folder in JSF (or any web app), to access it from java code is next:

import java.util.ResourceBundle;

public abstract class AbstractBean {
  private static final String SOMEUI_BUNDLE_NAME = "SomeUI";
  private static final ResourceBundle SOMEUI_BUNDLE = 
    ResourceBundle.getBundle(SOMEUI_BUNDLE_NAME);

  private static final String SOME_KEY = SOMEUI_BUNDLE.getString("some_key");
}

SOME_KEY will contain some value.