• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 File Upload Maximum Size

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi All,

I am new to the struts2 framework.And first time doing file upload using struts2 framework.My requirement is to upload the number of files with no limit on file size.
When I am trying to add a file more then 10 MB it is giving me the exception
as
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (15379388)
exceeds the configured maximum (10485760).

I also tried to configure with interceptor

<action name="addFilePath" class="com.kjaya.ris.servlet.ULinkFilesServlet" method="addFiles">
<interceptor-ref name="fileUpload">
<param name="maximumSize">500000</param>
</interceptor-ref>

then I got a error message on my jsp page as
the request was rejected because its size (15379388) exceeds the configured maximum (10485760)

Can anyone please help me to solve this problem

Thanks in advance
Monica Jindal
 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try increase the file size(from 500000 to much greater) and post back if you get any error.
 
monica jindal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Sorry for the delay for replying .
I got the solution of the problem.
I increased the size as struts.multipart.maxSize=100485760 in struts.properties file
By doing this file size limit is extended but at the same time I cannot have unlimited file size because
struts2 framework would not allow as it affects the performance .




Thanks
Monica
 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic