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

CLONE - FileUploadInterceptor and TokenInterceptor should use the configured custom TextProvider

    XMLWordPrintableJSON

    Details

      Description

      Struts2 supports the usage of a custom text provider by setting some environment constants in struts.xml:

      example:
      <bean class="test.CustomTextProvider" name="myTextProvider" type="com.opensymphony.xwork2.TextProvider" />
      <constant name="struts.xworkTextProvider" value="myTextProvider" />

      The struts2 core FileUploadInterceptor and the TokenInterceptor don't use this new custom TextProvider hence they use XWork's LocalizedTextUtil class to lookup translations. Why the translations don't get resolved via an injected TextProvider?

      At least method:
      private String getTextMessage(Object action, String messageKey, Object[] args, Locale locale) {
      should have a "protected" signature to allow override.

      More comments in the WW-3552 Clone.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maurizio.cucchiara Maurizio Cucchiara
                Reporter:
                lbernacchioni Lorenzo Bernacchioni
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: