1 Reply Latest reply on Dec 11, 2009 4:56 PM by DrClap

    Can't find bundle for base name Language, locale en_US


      My question on internationalization is in regards to a web application & not a desktop app but it is internationalization.

      Im building a class so that in all my jsp pages I can call labels with something like <%=rb.getLabel("LBL_INTRO")%>

      The class is in com.bis.webapp.resourcebundles

      There are servlets ect in the jar when jboss loads it sets the jar with:

      The problem is in the class every time ResourceBundle.+getBundle+("Language", LangLocale) is called I get the dreaded Cant find bundle.

      Ive done a hundred iterations of trying to path the getBundle & just cant figure it out. Do I have to load the properties files in the jar? I really dont want to have to rebuild the file everytime there is a language change.

      After research here are couple of things I have tried.
      ResourceBundle.+getBundle+("com.bis.webapp.resourcebundles.Language", LangLocale)

      ResourceBundle.+getBundle+("com/bis/webapp/resourcebundles/Language", LangLocale)
      ResourceBundle.+getBundle+("webappext/Language", LangLocale)
      ResourceBundle.+getBundle+("rb/Language", LangLocale)
      ResourceBundle.+getBundle+("Language", LangLocale)

      Directory structure of site is
      classes --> Language_en_US.properties
      lib -->webappext.jar

      The call to getBundle works fine in the JSP page so I know its a pathing issue to the bundle when the class is built into a jar but for the life of me I cant figure out how to tell it where to look. Heck it would be helpful if I could just figure out where its trying to look for the bundle.