Reputation: 20856
I get this error while trying to load file -
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (341297) exceeds the configured maximum (51200)
Now, I want to override the FileUploadBase size in my program by inheriting it...How can do it my servlet..
Upvotes: 2
Views: 9539
Reputation: 781
I used to get the same error when i tried to upload file on my tomcat server. caused by Thrown to indicate that the request size exceeds the configured maximum.
solution goes here. Increase Tomcat upload size limit
webapps/manager/WEB-INF/web.xml navigate to line 55, you will see the limit :
<multipart-config>
<!-- 50MB max -->
<max-file-size>52428800</max-file-size>
<max-request-size>52428800</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>
change file-size-threshold to 0 ,Hope this works.
Upvotes: 2