struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylva Degerfeldt" <>
Subject [S2]Validation with xml file not working
Date Thu, 14 Aug 2008 15:42:29 GMT
Hi everyone,

I'm trying to use the Validation framework by creating a file called
NameAndCvAction-validations.xml, for my action "NameAndCvAction", but
it's not working the way it should.
I've stepped through the code and it seems that the validations that
should have been made through the xml file just don't happen.

When, for instance, I've tried to deliberately leave some fields empty
(which the validator should have noticed), the execute method is still
invoked. This shouldn't happen when there are validation errors,

I've put the validation xml file in the same directory (and package)
as the corresponding action, but it seems that Struts 2 can't find it
anyway. What am I doing wrong?

This is the declaration of my action in struts.xml:
<action name = "NameAndCvAction" class = "Web.StrutsActions.NameAndCvAction">
            <result name = "input">/NameAndCv.jsp</result>
(This belongs to a package that extends struts-default)

By the way, I'm also using simple validation which works without
problems. (But I'd like to know how to use the validation framework
"the harder way" too.)

Can somebody please help me?

Thanks in advance!


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

View raw message