Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts file upload size limit

 
Dave Knipp
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm in the process of converting an existing jsp to use struts. The jsp has a multipart form that was previously parsed and handled by using the apache fileupload project. The upload should be able to handle large files, in excess of 1MB.
My question is, how does the struts framework utilize the fileupload project?? I know that all you have to do is use the html:file tag and then store it in your action form as type FormFile. But i was curious if anyone knows if the struts framework uses temp files to store the file data if it is too large to hold in memory. I previously ran into out of memory errors and solved it by using the fileupload projects temp file storing capabilities. Does struts use that same methodology? If not does anyone know of a proper solution?
Thanks,
Dave
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I think you can specify the name of folder where you want to store uplodaed files as well as max. file size in <controller> tag of Struts-Config.xml. attributes are tempDir & maxFileSize is suppose.

I hope this helps
Shrinivas Mujumdar
 
sathish Havalige
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Am using file upload concept in my project, how to upload files from my computer to another computer please tel me if you know the answer
 
Nam Ha Minh
Ranch Hand
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sathish Havalige wrote:Hello,
Am using file upload concept in my project, how to upload files from my computer to another computer please tel me if you know the answer


Here is the tutorial you need: Upload file with Apache Common file upload
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic