Struts2 file upload max size

struts2

Solution

Put this in your struts.xml file

<constant name="struts.multipart.maxSize" value="30000000" />

See http://struts.apache.org/2.x/docs/file-upload.html#FileUpload-AdvancedConfiguration.

Updated link - https://struts.apache.org/core-developers/file-upload.html#file-size-limits

Problem

I need to upload files upto 10 MB.I used the following .In my struts.xml i configured like as follows. ``` <action name="doUpload" class="com.example.UploadAction"> <interceptor-ref name="fileUpload"> <param name="maximumSize">20971520</param> </interceptor-ref> </action> ``` I did not configured any where other than this.I am getting the following error. the request was rejected because its size (2102840) exceeds the configured maximum (2097152) Can any one suggest me what might be the reason.Thanks in advance.

Original source

Related problems