This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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