title: Multiple application properties in struts2 and need to change property file in java based on somecondition?
body: <p>I am using</p>
  
  <pre><code>struts.custom.i18n.resources=file1,file2
  </code></pre>
  
  <p><strong>file1(ApplicationResources1.properties)</strong></p>
  
  <pre><code>enter.user = User name
  </code></pre>
  
  <p><strong>file2(ApplicationResources2.properties)</strong></p>
  
  <pre><code>enter.user = User name1
  </code></pre>
  
  <p>based on some condition  I need to switch over the file from file1 to file2 in action.?
  I have used the following code...Both files are get loaded but i need to refer any of these files based on condition... </p>
  
  <pre><code>Struts.xml
  &lt;constant name="struts.custom.i18n.resources"
      value="ApplicationResources2,ApplicationResources1" /&gt;
  
  Test.java
  
  if(condition){
      LocalizedTextUtil.clearDefaultResourceBundles();
  LocalizedTextUtil.addDefaultResourceBundle("ApplicationResources1.properties");
  LocalizedTextUtil.setReloadBundles(true); 
  }else{
      LocalizedTextUtil.clearDefaultResourceBundles();
  LocalizedTextUtil.addDefaultResourceBundle("ApplicationResources2.properties");
  LocalizedTextUtil.setReloadBundles(true); 
  }
  </code></pre>