I’m using Struts 2 and the REST plugin. Validation in Struts 2 is ClassName-actionAlias-validation.xml. However, using the REST plugin the action alias is always /. For example OrdersController -> /orders -> OrdersController-orders-validation.xml.
How can I get different validations depending on the REST method? Mainly, I want one type of validation for the update() method and another for the create() method.
I’m using Struts 2 and the REST plugin. Validation in Struts 2 is ClassName-actionAlias-validation.xml.
Share
Have you considered using annotations for the validations? That makes it simpler to tie them to the correct method.