Put the code below in the serlet where you get the data before calling the data warehouse API.
// Determine the HTTP method long maxSize = 1024*1024 * 50; //Limit 50 MB boolean isPostMethod = request.getMethod().equals("POST"); // Verify the content length int contentLength = request.getContentLength(); if (isPostMethod && (contentLength < 0 || contentLength > maxSize)) //posted data size is not in acceptable range else { // Process Data }
Manjoor
source share