JSP and Web Application Security

Test your knowledge of JavaServer Pages (JSP), deployment descriptors, and web application security mechanisms including authentication and authorization.

5 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

When using a form-based authentication, which action must be used in the login form?

  1. j_login
  2. j_get_user
  3. j_login_check
  4. j_get_security
  5. j_security_check
Question 2 Multiple Choice (Single Answer)

Which security mechanism is employed only on the server-side to limit access to resources or components?

  1. authorization
  2. data integrity
  3. confidentiality
  4. authentication
Question 3 Multiple Choice (Single Answer)

Which element of a web application deployment descriptor element is required?

  1. <realm-name>
  2. <auth-method>
  3. <security-role>
  4. <transport-guarantee>
  5. <web-resource-collection>
Question 4 Multiple Choice (Single Answer)

Given: <%-- insert code here --%> Today is: <%= new Date() %> What needs to go on line 1?

  1. <%@ page import='java.util.Date' %>
  2. <%@ import class='java.util.Date' %>
  3. <%@ include file='java.util.Date' %>
  4. <%@ include class='java.util.Date' %>
Question 5 Multiple Choice (Single Answer)

Given the web application deployment descriptor: 1 2 3 *.jsp 4 false 5 6 andexample.jsp: 10 x 5 = ${10 * 5}
2 * 3 = <%= 2 * 3 %>
What is the result?

  1. An error occurs during page translation
  2. Translation is successful, but nothing is included in the response.
  3. Both "10 x 5 = 50" and "2 * 3 = 6" are included in the JSP response
  4. The text "10 x 5 = 50" is included in the JSP response, but "2 * 3 = 6" is NOT
  5. The text "2 * 3 = 6" is included in the JSP response, but "10 x 5 = 50" is NOT