Which of the following configuration settings in server.xml will allow Tomcat server administrator to impose limit on uploading file based on their size?
To impose a limit on the size of uploaded files in a Tomcat server, the administrator can use the maxPostSize attribute in the <Connector> element within the server.xml configuration file.
The correct option is:
D. <connector... maxPostSize="file size" />
In this setting, "file size" should be the maximum allowed size in bytes. For example, to limit uploads to 2 megabytes, you would set maxPostSize to "2097152" (2 * 1024 * 1024).
Here's an example:
xml
<Connector port="8080" protocol="HTTP/1.1"
maxPostSize="2097152" />
The other options are not standard settings for limiting file upload size in Tomcat:
A. <connector... maxFileLimit="file size" />: maxFileLimit is not a standard Tomcat attribute for this purpose.
B. <connector... maxPostSize="0" />: Setting maxPostSize to "0" would actually disable the size limit, allowing unlimited uploads.
C. <connector... maxFileSize="file size" />: maxFileSize is not a standard Tomcat attribute for this purpose.
Therefore, to limit the size of uploaded files, the maxPostSize attribute should be used.
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.312-96 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
yawmumma
7 months, 4 weeks ago