开发者

i18n cannot find resource bundle

开发者 https://www.devze.com 2022-12-17 23:18 出处:网络
I have placed translation开发者_开发问答 file app_fi.properties in folder /WEB-INF/i18n/, but I get following error message. What could be wrong here?

I have placed translation开发者_开发问答 file app_fi.properties in folder /WEB-INF/i18n/, but I get following error message. What could be wrong here?

java.util.MissingResourceException: Can't find bundle for base name WEB-INF.i18n.app, locale fi_FI  java.util.ResourceBundle.throwMissingResourceException(Unknown Source)  java.util.ResourceBundle.getBundleImpl(Unknown Source)
    java.util.ResourceBundle.getBundle(Unknown Source)  


You have to put app_*.properties in /WEB-INF/classes (or somewhere in the classpath) and load it as it were a class.

By example:

/WEB-INF/classes/i18n/pack2/app_fi.properties

is loaded with

ResourceBundle.getBundle("i18n.pack2.app", ...)


Did you add the WEB-INF/i18n folder to the containers' classpath?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号