Changing values in a properties file
Hi,
I'm working in a Struts environment and I am trying to open a .properties file in my WEB-INF/classes/ (*.properties) directory and allow the user to change those values and write them back.
I access the properties by pulling them out in a Map:
Locale locale = LocaleContextHolder.getLocale();
ResourceBundle resBundle = ResourceBundle.getBundle(SP_PROPERTIES_FILE,locale);
Enumeration propertyKeys = resBundle.getKeys();
Map spProperties =new HashMap();
while (propertyKeys.hasMoreElements()){
String key = (String) propertyKeys.nextElement();
if(key !=null){
key = key.trim();
}
String value = resBundle.getString(key);
if(value !=null ){
value = value.trim();
}
spProperties.put(key, value);
}
I then change the values depending on their keys, but it is after this step I am unsure how perform the write back.
Thanks,

