Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileUpload using Struts

 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Merrill...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic