title: Why is struts validation not working for me?
body: <p>I'm trying to use Struts validation to check various fields entered by users.  If anyone is able to help me see what I lack, I would be extremely grateful.  Here's what I have:</p>
  
  <p>I put <code>validation.xml</code> and <code>TestAction-validation.xml</code> in <code>WEB-INF/classes/</code></p>
  
  <p>Here is <code>validation.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE validators PUBLIC
      "-//OpenSymphony Group//XWork Validator Config 1.0//EN"
      "http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd"&gt;
  
  &lt;validators&gt;
      &lt;validator name="int" class="com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator"/&gt;
      &lt;validator name="stringlength" class="com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator"/&gt;
      . . .
  &lt;/validators&gt;
  </code></pre>
  
  <p>Here is <code>TestAction-validation.xml</code>:</p>
  
  <pre><code>&lt;!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
     "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"&gt;
  &lt;validators&gt;
    &lt;field name="testInt"&gt;
      &lt;field-validator type="int"&gt;
        &lt;param name="min"&gt;0&lt;/param&gt;
        &lt;param name="max"&gt;9&lt;/param&gt;
        &lt;message&gt;Number not in range&lt;/message&gt;
      &lt;/field-validator&gt;
    &lt;/field&gt;
    &lt;field name="testString"&gt;
      &lt;field-validator type="stringlength"&gt;
        &lt;param name="minLength"&gt;4&lt;/param&gt;
        &lt;message&gt;String not long enough.&lt;/message&gt;
      &lt;/field-validator&gt;
    &lt;/field&gt;
  &lt;/validators&gt;
  </code></pre>
  
  <p>My <code>struts.xml</code> extends <code>struts-default</code>, and I have a extremely simple action class <code>TestAction</code> which extends <code>ActionSupport</code> and has fields <code>testInt</code> and <code>testString</code>.  </p>
  
  <p>From what I've read, this should be sufficient for Struts to check the values entered, but it isn't happening.  What am I missing?</p>