This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Struts and the fly likes FileUpload using Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "FileUpload using Struts" Watch "FileUpload using Struts" New topic
Author

FileUpload using Struts

Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
Hi,

How to limit the size of the file to be uploaded?? I have to upload files if <= 1.5 MB. Where do i need to configure this?

Thanks,
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The struts-examples.war file that comes with the Struts download has an example of uploading a file, checking its size, and returning an error message if it's too big. Just study their code, and you'll see how to do it. Look especially at the org.apache.struts.webapp.upload.UploadAction class.
[ May 02, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
Thanks a lot Merrill...
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: FileUpload using Struts
 
Similar Threads
Cant use object from another class
Posting to bump up my count...
WA #1.....word association
The x900 effect ?
Text box value is not being completely filled with request attribute