Customizing messages for filesize exceed in java servlet?
posted 1 year ago
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.
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