I have a web service deployed to Tomcat 5.5 using Axis2 1.4. (Win Server 
2003/Java 5). My AAR file contains a .properties file that I would like to 
update. I can read the .properties from the AAR but I would like to know how it 
can be updated from within the AAR. Is this possible?

Code below reads the property file in the AAR and sets a value for a certain 
key. Now I just need to save the updated value back to the .properties file in 
the AAR.

 InputStream propertystream = loader
     .getResourceAsStream("ConceptSearch.properties");

 Properties properties = new Properties() ;
 properties.load(propertystream);
 Enumeration e = properties.propertyNames();
 while (e.hasMoreElements()) {
  String key = (String) e.nextElement();
  if(key.equals("disableSERVICE")) {
   properties.setProperty(key, "XYZZZ");
  }
 }
 
Thank you.


      

Reply via email to