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?
精彩评论