FileUploadBase$SizeLimitExceededException: the request was rejected because its size (337867) exceeds the configured maximum (200)

StackOverflow https://stackoverflow.com/questions/23428877

سؤال

How to handle custom inteceptors execptions in Struts 2?

org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: 
the request was rejected because its size (337867) exceeds the configured 
maximum (200)
هل كانت مفيدة؟

المحلول 2

<global-exception-mappings>
  <exception-mapping exception="java.lang.NullPointerException" result="npe"/>
</global-exception-mappings>

نصائح أخرى

Set this constant to increase a request limit

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

Please remember that the struts.multipart.maxSize is the size limit of the whole request, which means when you uploading multiple files, the sum of their size must be below the struts.multipart.maxSize!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top