变量替换JSF资源包属性文件

变量替换JSF资源包属性文件,jsf,resourcebundle,Jsf,Resourcebundle,我可以在JSF资源包属性文本文件中执行类似操作吗: receptionContact=Reception reservationContact=Reservation receptionEmail={receptionContact} reservationEmail={reservationContact} 您可以创建资源包,但不能通过键反射性地重用值。请看一下这个: 这样,你就不必重复你自己了 没有: company.service.phone=555-1212 company.ser

我可以在JSF资源包属性文本文件中执行类似操作吗:

receptionContact=Reception
reservationContact=Reservation

receptionEmail={receptionContact}
reservationEmail={reservationContact}
您可以创建资源包,但不能通过键反射性地重用值。请看一下这个:

这样,你就不必重复你自己了

没有:

company.service.phone=555-1212
company.service.email=help@company.com
my.error.message=Problem accessing account!\
                 Please call customer service at 555-1212 \
                 or email us at help@company.com 
company.service.phone=555-1212
company.service.email=help@company.com
my.error.message=Problem accessing account!\
                 Please call customer service at ${company.service.phone} \
                 or email us at ${company.service.email}
与:

company.service.phone=555-1212
company.service.email=help@company.com
my.error.message=Problem accessing account!\
                 Please call customer service at 555-1212 \
                 or email us at help@company.com 
company.service.phone=555-1212
company.service.email=help@company.com
my.error.message=Problem accessing account!\
                 Please call customer service at ${company.service.phone} \
                 or email us at ${company.service.email}

是另一个关于格式的有趣教程。

是。我用它来学习如何在jsf中使用自定义资源包:嗨,伙计,我想你可能弄错了我的问题,我正试图重用资源包本身的文本。@ChinBoon:事实上他在回答你的问题-但是你需要这个库,你找到答案了吗?