Im trying to upload file from a JSP file and I get the following error in catalina.out. As specified in many blogs, I increased the the max-file-size under webapps/manager/WEB-
you can use in Servlet like bellow
@WebServlet(name = "RemittanceDocApi", urlPatterns = {"/RemittanceDocApi"})
@MultipartConfig(fileSizeThreshold = 1024 * 1024 * 2, // 2MB
maxFileSize = 1024 * 1024 * 10, // 10MB
maxRequestSize = 1024 * 1024 * 50) // 50MB
public class RemittanceDocApi extends HttpServlet {
}