Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Customizing messages for filesize exceed in java servlet?

Tomas Hol├║bek
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on SmartGwt application with file savings. My upload servlet accepts more than one file. If one of the files is exceeding filesize treshold, I will need to localize the file and send customized error message back then.

Servlet code:

I am not associated with catching IllegalStateExceptions and checking its message. My multipart configuration is placed in web.xml

I would like to localize both the file and the message in the servlet - that means find the exceeding file and customize message - example: "File 'exmaple.mp3' is exceeding maximum size of 2 MB" and also "Your package of mp3s is exceeding maximum size of 100 MB".

Is it possible to localize the file ? Can error messages be customized in any configuration file (web.xml - multipart conf, ...) ? Any others ideas ?
Thanks for your answers
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic