struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Struts 2.0.9 server side validation problem
Date Wed, 19 Dec 2007 16:04:42 GMT
--- TuomoS <> wrote:
> How can I confirm that the XML validator file is read?

Turning up the debug level on com.opensymphony.xwork2.validator is the

> It seems that the actionName-validation.xml is not read. I

That's not very likely; this definitely works.

> have checked many times that the
> action java class matches with the xml file name.

Does it subclass ActionSupport (or implement ValidationAware and

> 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. 

For completeness, I think you meant addFieldError there.

> Is it mandatory to define doctype in the validation xml file?

That I don't know, but I don't know why you wouldn't put it in there; it can
be pretty helpful.

> is it really enough just to have the file in classpath? (WEBINF/..)

WEB-INF is not the classpath; the validation file should be in the same
package as the action in question.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message