This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts file upload size limit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts file upload size limit" Watch "Struts file upload size limit" New topic
Author

Struts file upload size limit

Dave Knipp
Ranch Hand

Joined: Oct 14, 2003
Posts: 146
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


SCJP 1.4, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, IBM Certified Solution Developer -WebSphere Studio V5.0
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
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

Joined: Nov 12, 2012
Posts: 1
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

Joined: Oct 31, 2011
Posts: 498

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


PM Me If You Want to get Urgent Help on Java Programming
 
jQuery in Action, 2nd edition
 
subject: Struts file upload size limit
 
Similar Threads
Large File Upload
Receiving multipart request
commons-fileupload
FileUploadException
Reg. File Upload