[
https://issues.apache.org/jira/browse/WW-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445982#comment-13445982
]
Hudson commented on WW-3177:
----------------------------
Integrated in Struts2 #520 (See [https://builds.apache.org/job/Struts2/520/])
WW-3177 adds better German translation of the error message (Revision
1379461)
WW-3177 adds better way to handle error messages when an exception occurs, adds
support for I18N to translate exceptions and adds default error messages
(Revision 1379458)
Result = SUCCESS
lukaszlenart :
Files :
*
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_de.properties
lukaszlenart :
Files :
*
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
*
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
*
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java
*
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
*
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
*
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages.properties
*
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_da.properties
*
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_de.properties
*
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pl.properties
*
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/struts-messages_pt.properties
*
/struts/struts2/trunk/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
*
/struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
> i18n not supported for file upload error messages
> -------------------------------------------------
>
> Key: WW-3177
> URL: https://issues.apache.org/jira/browse/WW-3177
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7,
> 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.13, 2.0.14,
> 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.8
> Reporter: Amit Sharma
> Assignee: Lukasz Lenart
> Fix For: 2.3.5
>
> Attachments: upload_1.zip, upload.zip
>
>
> I am troubleling with the FileUploadInterceptor in Struts2.
> I want to have printed my own messages on failure of the file upload which
> takes place in the interceptor. I am uploading files exceeding the set
> maximum size. Struts2 documentation talks about the properties
> struts.messages.error.uploading and struts.messages.error.file.too.large
> being the error message if the failure occurs or if the actual file size
> exceeds the configured maximum limit. But every time the message is something
> like <u>the request was rejected because its size (2352563) exceeds the
> configured maximum (2097152)</u>. This message comes from the
> FileUploadException that is thrown from with-in the common-fileupload class
> FileUploadBase. And In the class JakartaMultipartRequest where it is handled,
> the code in struts 2.1.6 simply adds this message in its collection of
> errors. and thus the error messages corresponding to the properties like
> <b>struts.messages.error.file.too.large</b>,
> <b>struts.messages.error.uploading</b> and
> <b>struts.messages.error.content.type.not.allowed</b> in various
> resource-bundles never gets applied.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira