Annotation Type MultipartConfig
This annotation is used to indicate that the
E.g.
Servlet on which it is declared expects requests
to made using the
multipart/form-data MIME type. Part components of a given
multipart/form-data request are retrieved by a Servlet annotated with MultipartConfig by calling
HttpServletRequest.getPart(String) or
HttpServletRequest.getParts().E.g.
@WebServlet("/upload")}@MultipartConfig() public class UploadServlet extends
HttpServlet ... } - Since:
- Servlet 3.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintSpecifies the size threshold in bytes after which the file will be written to disk.Specifies the location in which the Container stores temporary files.longSpecifies the maximum size allowed for uploaded files.longSpecifies the maximum size of the request allowed formultipart/form-data.
-
Element Details
-
location
String locationSpecifies the location in which the Container stores temporary files.- Returns:
- location in which the Container stores temporary files
- Default:
""
-
maxFileSize
long maxFileSizeSpecifies the maximum size allowed for uploaded files.- Returns:
- the maximum size allowed for uploaded files (in bytes)
- Default:
-1L
-
maxRequestSize
long maxRequestSizeSpecifies the maximum size of the request allowed formultipart/form-data.- Returns:
- the maximum size of the request allowed for
multipart/form-data
- Default:
-1L
-
fileSizeThreshold
int fileSizeThresholdSpecifies the size threshold in bytes after which the file will be written to disk.- Returns:
- the size threshold at which the file will be written to the disk
- Default:
0
-