*/
public String loadStringResource(Class clazz, final String key, final Locale locale,
final String style)
{
// Load the properties associated with the path
IPropertiesFactory propertiesFactory = Application.get().getResourceSettings()
.getPropertiesFactory();
// All GeoServer releated resources are loaded into a GeoServerApplication*.properties file
String path = "/GeoServerApplication";
while (true)
{
// Iterator over all the combinations
ResourceNameIterator iter = new ResourceNameIterator(path, style, locale,
"properties,xml");
while (iter.hasNext())
{
String newPath = (String)iter.next();
final Properties props = propertiesFactory.load(clazz, newPath);
if (props != null)
{
// Lookup the qualified key
String qualifiedKey = clazz != null ? clazz.getSimpleName() + "." + key : key;
String value = props.getString(qualifiedKey);