exam questions

Exam 312-96 All Questions

View all questions & answers for the 312-96 exam

Exam 312-96 topic 1 question 28 discussion

Actual exam question from ECCouncil's 312-96
Question #: 28
Topic #: 1
[All 312-96 Questions]

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?

  • A. < 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 >
  • B. < 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 > disable < /param-value> < /init-param > < load-on-startup > 1 < /load-on-startup> < /servlet >
  • C. < 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 > enable < /param-value > < /init-param > < load-on-startup> 1 < /load-on-startup > < /servlet >
  • D. < 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 > true < /param-value > < /init-param > < load-on-startup > l < /load-on-startup > < /servlet >
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
yawmumma
8 months ago
Selected Answer: A
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.
upvoted 2 times
...
yawmumma
8 months, 1 week ago
Selected Answer: C
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
...
yawmumma
8 months, 1 week ago
Selected Answer: A
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
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago