On 05/18/09 05:01 AM, Sanganak-Guru wrote:
> I am working on a piece of code related to file upload using struts.
> I want to abort/discard a file upload request from browser in case the file
> size being uploaded is larger than what is currently configured.
> Is there any way to discard / abort file upload request and show user an
> error in case the file size is larger than configured file size upload
In earlier GlassFish releases, you would specify the max file-upload size
via the maxPostSize property of (default: 4096).
The upcoming Servlet 3.0 spec, which is implemented by GlassFish v3, adds
server-side support for file-upload, and allows you to specify
via the new , or via the new MultipartConfig annotation)
////////////configuration for multipart/form-data requests, including
the maximum size
of uploaded files and the maximum (total) size of multipart/form-data
This configuration may be specified on a per-servlet basis (for the
handling multipart/form-data requests).
> Thanks in advance,
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.