Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Struts file upload size limit

 
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
 
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
 
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
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • 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
Boost this thread!