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

File Upload Interceptor doesn't display i18n message while error occured.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6
    • 2.3.20
    • Core Interceptors
    • None
    • Tomcat6, Jboss-Web 2.1.1,Jetty 6.1

    Description

      As it described in the document: http://cwiki.apache.org/WW/file-upload-interceptor.html

      This interceptor will add several field errors, assuming that the action implements ValidationAware. These error messages are based on several i18n values stored in struts-messages.properties, a default i18n file processed for all i18n requests. You can override the text of these messages by providing text for the following keys:
      struts.messages.error.uploading - a general error that occurs when the file could not be uploaded
      struts.messages.error.file.too.large - occurs when the uploaded file is too large
      struts.messages.error.content.type.not.allowed - occurs when the uploaded file does not match the expected content types specified

      but in fact it doen't show these messages.I followe the code into the interceptor,and find it only catch the exceptions and add the exception's message simplely by invoke addActionError method.

      Attachments

        Activity

          People

            Unassigned Unassigned
            flashing Ken
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: