If you are building with maven2, you might make sure that you are adding the
xml files in your source directory to your compiled output directory.  I
know this was something that fooled me at first ...

<build>
  <resources>
    <!-- Include resources under src/main/java in WEB-INF/classes -->
    <resource>
      <directory>src/main/java</directory>
      <includes>
        <include>**/*.properties</include>
        <include>**/*.xml</include>
      </includes>
    </resource>
  </resources>
</build>


On 12/19/07, TuomoS <[EMAIL PROTECTED]> wrote:
>
>
> How can I confirm that the XML validator file is read? It seems that the
> actionName-validation.xml is not read. I have checked many times that the
> action java class matches with the xml file name.
>
> actionName.java
> actionName-validation.xml (when using execute method in submit)
>
> I overrided the validate() method in my action for debugging. I can add a
> fielderror manually with hasFieldError() method and it is then shown in
> the
> jsp.
>
> Is it mandatory to define doctype in the validation xml file? And is it
> really enough just to have the file in classpath? (WEBINF/..)
>
> clip from the validation file:
>
> <validators>
> <field name="trader.address.name">
>     <field-validator type="requiredstring">
>        <message key="errors.required.name"/>
>     </field-validator>
> </field>
>
> .
> .
> .
> :clap:
>
> </validators>
> --
> View this message in context:
> http://www.nabble.com/Struts-2.0.9-server-side-validation-problem-tp14419444p14419444.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to