收录日期:2019/12/11 04:07:01 时间:2010-10-28 14:21:07 标签:java,properties,seam,seam2

Is there a way to access properties files in seam app? I'm looking for some kind of resource loader..

Thanks in advance!

There is actually Seam native component - ResourceLoader which can be simply injected with @In and it gives an access to the property files via ResourceBundle.

Example:

import org.jboss.seam.core.ResourceLoader;
... 
@In
private ResourceLoader resourceLoader;
...
resourceLoader.getResource("BUNDLE_NAME");

This post from the official seam forum may help you.