How to use ActionName-alias-validation.xml?

Ute Kaiser <[email protected]> Tue, 14 Oct 2025 12:48:56 +0000
Newsgroups gmane.comp.jakarta.struts.user
Message-ID <trinity-743bd96b-950c-455a-9349-8ac8f3a2d1db-1760446136735@trinity-msg-rest-webde-webde-live-f747bc64b-n9982>
Hi,
I have a problem with a validation that should only be activated for metho=
d create in my Action=2E

I do not understand how to use this "Action Alias" in the documentation:
>>
https://struts=2Eapache=2Eorg/core-developers/validation=2Ehtml
Validation rules can be specified:
1=2EPer Action class: in a file named ActionName-validation=2Exml
2=2E Per Action alias: in a file named ActionName-alias-validation=2Exml
In this context, =E2=80=9CAction Alias=E2=80=9D refers to the action name =
as given in the Struts configuration=2E Often, the name attribute matches t=
he method name, but they may also differ=2E
<<

I had some success with option one "ActionName-validation=2Exml" by creati=
ng X-validation=2Exml (X=3DName of the java action class)
But I am lost trying the second option=2E X-create-validation=2Exml is ign=
ored, X-validate-validation=2Exml is ignored=2E

It would be so nice if someone could just add the file name for the follow=
ing example:

Migrating from Struts1 to Struts7, I have complex action names with slashe=
s=2E
		<action name=3D"a/b/myaction=2Evalidate"
			class=3D"myPath=2EMyAction"
			method=3D"create">
			<result name=3D"input" type=3D"tiles">mytiles</result>
			<result name=3D"success" type=3D"tiles">mytiles</result>
		</action>
Best regards
Ute