struts-user mailing list archives

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

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

> 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
Validateable?

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

d.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message