Package org.apache.tomcat.util.http.fileupload

Examples of org.apache.tomcat.util.http.fileupload.DiskFileItemFactory


            contentType = contentType.trim();
        }
        if (!("multipart/form-data".equals(contentType)))
            throw new ServletException(sm.getString("coyoteRequest.notMultipart"));

        DiskFileItemFactory factory = new DiskFileItemFactory();
        if (config.getLocation() != null) {
            factory.setRepository(new File(config.getLocation()));
        }
        if (config.getFileSizeThreshold() > 0) {
            factory.setSizeThreshold(config.getFileSizeThreshold());
        }
       
        ServletFileUpload upload = new ServletFileUpload();
        upload.setFileItemFactory(factory);
        upload.setFileSizeMax(config.getMaxFileSize());
View Full Code Here


                            location));
            return;
        }
       
        // Create a new file upload handler
        DiskFileItemFactory factory = new DiskFileItemFactory();
        try {
            factory.setRepository(location.getCanonicalFile());
        } catch (IOException ioe) {
            partsParseException = ioe;
            return;
        }
        factory.setSizeThreshold(mce.getFileSizeThreshold());
       
        ServletFileUpload upload = new ServletFileUpload();
        upload.setFileItemFactory(factory);
        upload.setFileSizeMax(mce.getMaxFileSize());
        upload.setSizeMax(mce.getMaxRequestSize());
View Full Code Here

            contentType = contentType.trim();
        }
        if (!("multipart/form-data".equals(contentType)))
            throw new ServletException(sm.getString("coyoteRequest.notMultipart"));

        DiskFileItemFactory factory = new DiskFileItemFactory();
        if (config.getLocation() != null) {
            factory.setRepository(new File(config.getLocation()));
        }
        if (config.getFileSizeThreshold() > 0) {
            factory.setSizeThreshold(config.getFileSizeThreshold());
        }
       
        ServletFileUpload upload = new ServletFileUpload();
        upload.setFileItemFactory(factory);
        upload.setFileSizeMax(config.getMaxFileSize());
View Full Code Here

TOP

Related Classes of org.apache.tomcat.util.http.fileupload.DiskFileItemFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.