Jsf 2 JSF2加载包问题
正在尝试使用Mojarra标记设计facelet。在基本模板中,尝试使用loadBundle标记加载属性文件。在运行时出现如下错误Jsf 2 JSF2加载包问题,jsf-2,Jsf 2,正在尝试使用Mojarra标记设计facelet。在基本模板中,尝试使用loadBundle标记加载属性文件。在运行时出现如下错误 Can't find resouce for bundle web/test/properties/sample key en_GB 将属性文件放置在下面的位置 webapp/test/properties/sample.properties并添加如下内容 <f:loadBundle basename="test.properties.sample"
Can't find resouce for bundle web/test/properties/sample key en_GB
将属性文件放置在下面的位置webapp/test/properties/sample.properties
并添加如下内容
<f:loadBundle basename="test.properties.sample" var="msgs" />
我还试图将属性文件放在webapp/resources/test/properties/sample.properties
下,但没有希望
有谁能帮我解释一下这个问题吗
提前感谢。首先,资源包应该位于src文件夹中。但您可以在这里找到有关资源束的详细示例:
我希望有帮助 你似乎在使用Maven结构,这是真的吗?请添加相应的Maven标签,以引起正确的人的注意。在标准结构中,只需将其放入
src
文件夹,就像放入Java类一样。