utilisation (de http://www.docjar.com/html/api/com/opensymphony/xwork2/util/LocalizedTextUtil.java.html):
...
clearMap(ResourceBundle.class, null, "cacheList");
// if it's Tomcat
if ("org.apache.catalina.loader.WebappClassLoader".equals(cl.getName())) {
clearMap(cl, loader, "resourceEntries");
}
...
private static void clearMap(Class cl, Object obj, String name)
throws NoSuchFieldException, IllegalAccessException,
NoSuchMethodException, InvocationTargetException {
Field field = cl.getDeclaredField(name);
field.setAccessible(true);
Object cache = field.get(obj);
synchronized (cache) {
Class ccl = cache.getClass();
Method clearMethod = ccl.getMethod("clear");
clearMethod.invoke(cache);
}
}
De toute évidence, vous pouvez simplement importer cette bibliothèque et de l'utiliser si vous voulez aussi.
Vous souhaitez donc modifier les propriétés dans votre fichier struts config et .properties sans redémarrer le conteneur? – amischiefr