4 Replies Latest reply on Feb 8, 2006 9:21 AM by Dan Liu

    How to get default Locale in @Startup class?

    Dan Liu Apprentice

      In the @Create method of my @Startup class, I need to pull some messages from my message bundle. The normal way is to use facescontext like this:
      FacesContext facesContext = FacesContext.getCurrentInstance();

      In a @Startup class, the facesContext is null when the application is starting up. What I really need is the default Locale that is defined in faces-config.xml. Once I get the Local, I should be able to get the bundle. I don't wanna write my own xml parser to get the boudle infor from faces-config.xml. Is there easy way to do this?