title: How to trim input field value in struts?
body: <p>I use Struts v1.3 and have following input form:</p>
  
  <p>In struts-config.xml:</p>
  
  <pre><code>    &lt;form-bean name="testForm" 
                 type="org.apache.struts.validator.DynaValidatorForm"&gt;
          &lt;form-property name="displayName" type="java.lang.String" /&gt;
      &lt;/form-bean&gt;
  </code></pre>
  
  <p>In validation.xml:</p>
  
  <pre><code>    &lt;form name="testForm"&gt;
          &lt;field property="displayName" depends="required"&gt;
              &lt;arg key="input.displayName" /&gt;
          &lt;/field&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>How do I trim value of "displayName"? How do I trim values of all "java.lang.String" input fields of the form?</p>