Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3191

Per Action alias validation for wildcard mappings broken due to WW-2996

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8
    • 2.1.8.1
    • Core Interceptors
    • None

    Description

      The com.opensymphony.xwork2.ValidationInterceptor was changed as a result of WW-2996 so that the name from the struts configuration file is passed into the action validation manager instead of the action alias name.

      The com.opensymphony.xwork2.validator.AnnotationActionValidator in buildAliasValidatorConfigs then tries to look for a file to load based on the config. This should be of the format ActionName-alias-validation.xml but if the struts configuration name is a wildcard mapping this will now be ActionName-alias*-validation.xml instead.

      So in my example the action alias is newMessage but the ValidationInterceptor is passing in new* as the context and then the manager tries to look for a file called NewMessage-new*-validation.xml instead of NewMessage-newMessage-validation.xml and can't find it.

      If I replace the validation interceptor with the struts 2.1.6 version then the validation works as expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            teagtera Peter Phillips
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: