Oliver is a web server admin and wants to configure the Tomcat server in such a way that it should not serve index pages in the absence of welcome files. Which of the following settings in CATALINA_HOME/conf/ in web.xml will solve his problem?
Jesus, I can delete my previous 2 comments, but they are for question 32. Admin if you read this please delete them.
To prevent Apache Tomcat from serving index pages in the absence of welcome files, Oliver should set the listings parameter to false in the web.xml configuration file located in CATALINA_HOME/conf/.
The correct setting is:
xml
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
So, the correct answer is A. Setting the listings parameter to false will disable the directory listing feature, and Tomcat will not serve index pages when welcome files are absent.
To avoid displaying server names in the server response header in Tomcat, you can set the Server attribute to an empty string in the <Connector> element within the server.xml configuration file.
The correct option is:
C. <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" Server = " " redirectPort="8443" />
By setting the Server attribute to an empty string, you effectively remove the server name from the response header, thereby enhancing the security by reducing information leakage.
The other options are not standard settings for this purpose:
A. This is a default Connector setting and doesn't address the issue of hiding the server name.
B. The attribute ServerName="disable" is not a standard way to disable the server name in the header.
D. Setting ServerName="null" is also not a standard way to remove the server name from the header.
Therefore, Option C is the correct choice for avoiding the display of server names in server response headers.
To avoid displaying server names in the server response header in Tomcat, you can set the Server attribute to an empty string in the <Connector> element within the server.xml configuration file.
The correct option is:
C. <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" Server = " " redirectPort="8443" />
By setting the Server attribute to an empty string, you effectively remove the server name from the response header, thereby enhancing the security by reducing information leakage.
The other options are not standard settings for this purpose:
A. This is a default Connector setting and doesn't address the issue of hiding the server name.
B. The attribute ServerName="disable" is not a standard way to disable the server name in the header.
D. Setting ServerName="null" is also not a standard way to remove the server name from the header.
Therefore, Option C is the correct choice for avoiding the display of server names in server response headers.
upvoted 1 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
8 months agoyawmumma
8 months, 1 week agoyawmumma
8 months, 1 week ago