struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ben_979 <>
Subject s2: Validation xml file not being used when validating a method
Date Tue, 17 Nov 2009 22:56:34 GMT

I'm trying to figure out the validation framework, and I don't have a clear
understanding from the docs I've read where I'm going wrong, so if someone
could point me in the right direction I'd appreciate it.

I'm trying to validate ONLY when a particular method of an action class is
being called. The action class is called ScheduleDetailAction and the method
is called update().

If I name the validation file ScheduleDetailAction-validation.xml, the
validation is invoked, but it is invoked ALL of the time, I only want it
when the update() method is called.

I'm reading that the naming convention I need to use for the xml file is
ActionName-ActionAlias-validation.xml, but what exactly an "ActionAlias" is
isn't clear to me.

The method is called from a form on a jsp page as follows:

<s:form action="ScheduleDetailAction_update" validate="true">

I've tried calling the validation file
ScheduleDetailAction-update-validation.xml and
ScheduleDetailAction-ScheduleDetailAction_update-validation.xml (and about
15 other things!!!) and I cannot get the validation to be invoked BEFORE the
update method is called.

Any suggestions as to what I'm doing incorrectly would be greatly

View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message