This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance 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