Certified Application Security Engineer – Java (CASE-Java) — Question 12
Which of the following configuration settings in server.xml will allow Tomcat server administrator to impose limit on uploading file based on their size?
Answer options
- A. < connector... maxFileLimit="file size" / >
- B. < connector... maxPostSize="0" / >
- C. < connector... maxFileSize="file size" / >
- D. < connector... maxPostSize="file size" / >
Correct answer: D
Explanation
The correct answer is D because the maxPostSize attribute in the connector configuration specifically restricts the size of HTTP POST requests, which includes file uploads. Option A is incorrect as maxFileLimit is not a valid attribute, while B sets the limit to zero, effectively disallowing uploads, and C refers to maxFileSize which is not the correct attribute used to define post size limits in Tomcat.