java - Change default error message for upload files on struts 2 -
i there,
i have multipart form upload file , in struts.xml
able alter max size:
<constant name="struts.multipart.maxsize" value="10485760"/>
but can't alter default error message when request bigger allowed.
i've tried add together struts.messages.error.file.too.large=too large!
getting same message:
the request rejected because size (31720350) exceeds configured maximum (10485760)
the message coming commons-fileupload framework default implementation of file uploading feature of struts2 framework. struts2 uses jakartamultipartrequest
parse request. if can alter class via configuration, shouldn't that. @ first seems handle exceptions thrown underlying framework. illustration can alter value of key
struts.messages.upload.error.sizelimitexceededexception=your message
java file-upload configuration struts2 multipart
No comments:
Post a Comment