title: ResourceBundle from Java/Struts and replace expressions
body: <p>If I have a Resource bundle property file:</p>
  
  <p>A.properties:</p>
  
  <pre><code>thekey={0} This is a test
  </code></pre>
  
  <p>And then I have java code that loads the resource bundle:</p>
  
  <pre><code>ResourceBundle labels = ResourceBundle.getBundle("A", currentLocale);
  labels.getString("thekey");
  </code></pre>
  
  <p>How can I replace the {0} text with some value</p>
  
  <pre><code>labels.getString("thekey", "Yes!!!");
  </code></pre>
  
  <p>Such that the output comes out as:</p>
  
  <pre><code>Yes!!! This is a test.
  </code></pre>
  
  <p>There are no methods that are part of Resource Bundle to do this.  Also, I am in Struts, is there some way to use MessageProperties to do the replacement.</p>