![]()
|
||||
How to set the maximum file size by OOP MimeParser: Java API for file upload JSP/Servlet by multipart/form-data
Java API for file upload JSP/Servlet by multipart/form-data. It can set the maximum file size to be uploaded. If the user tries to upload the larger files, your JSP/Servlet can catch the exception.
This Java API can set the maximum width/height of the image file (JPEG, GIF or PNG). For details about this feature, please read another page. Related Pages:
|
||||
Restrict Content-Length (in bytes) of the HTTP requestTo protect your JSP/Servlet against some kinds of denial-of-service attacks, all the parseXX( ) methods check the Content-Length of each HTTP request before processing the HTTP request. Please specify the max_request property in:
The Content-Length consists of:
This property must be specified in bytes. For example, if you'd like to set the maximum Content-Length to 100 KB, this property will be 102400. Restrict the size of the file to be uploadedIn usual, your Servlets/JSP needs to set the maximum file size to be uploaded. The default maximum size can be specified in the resource file. If 0 (zero) is specified, any size of files can be uploaded. The following 8 methods use this default maximum file size:
When the user tries to upload the larger files, all parseXXX(...) methods will throw:
|
|
|||
|
Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries. |
||||
|
ALL CONTENTS COPYRIGHT 1997-2007, OOP-Research Corporation. All rights reserved. |
||||