Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.1.8
-
None
Description
It used to be that if I had an action with two methods, say delete() and save(), then I could map a separate them with a single action like so:
<action name="*Review" class="com.myCompany.ReviewAction" method="
{1}">
<result name="success">review.ftl</result>
</action>
And then have separate validation files for each method like so:
ReviewAction-deleteReview-validation.xml
ReviewAction-saveReview-validation.xml
Unfortunately, this has been broken by this issue: https://issues.apache.org/struts/browse/WW-2996
as it appears to now look by the wildcard name "*Review" rather than the action name "deleteReview" or "saveReview" when looking for validation files.
Perhaps what needs to happen is that the context should go back to being the action name (deleteReview or saveReview), but the key to the validator cache should be the config name + the method (in this case if we use | as a separator "*Review|save" and "*Review|delete". This would mean for my case I'd get two validators and two cached instances, but for the person with the issue in WW-2996, since they have a non-dynamic method, they would get only the single validator cached.