java - How to create alias for action in Struts2 -
Both of these files have the same verification rules. How is the same XML used for mupltiple action?
action1-validation.xml Action2-validation.xml
struts.xml
: < / P>
& lt; Action Name = "Action 1" class = "test.Action1" /> & Lt; Action Name = "Action 2" class = "test.Action2" />
Now how to use the same recognition file based on Action Niyas for the action name? How to create a nickname for the action?
verb 1 {name of string; Date dub; Old age; } Action2 {string name; Date dub; Old age; }
What is the meaning of ActionAliasName and how can it be made ?, which is mentioned by the bottom line.
Validation. The XML format is either
You want to use the same verification file for both the action class because they have The properties are the same. You should choose to read and choose 3. Create a basic action class, whose action class has the same asset set for both and create * - validation.xml
for it.
Actions are mapped In the action configuration, names for this method may differ from the name of the method, which is why it is called an action alias.
You are also interested that the above will be appreciated.
Using a square for another option is the actions that are mapped in different ways and use each action class validation.
Comments
Post a Comment