JSP and Web Application Security
Test your knowledge of JavaServer Pages (JSP), deployment descriptors, and web application security mechanisms including authentication and authorization.
Questions
Question 1 Multiple Choice (Single Answer)
When using a form-based authentication, which action must be used in the login form?
- j_login
- j_get_user
- j_login_check
- j_get_security
- 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?
- authorization
- data integrity
- confidentiality
- authentication
Question 3 Multiple Choice (Single Answer)
Which element of a web application deployment descriptor element is required?
- <realm-name>
- <auth-method>
- <security-role>
- <transport-guarantee>
- <web-resource-collection>
Question 4 Multiple Choice (Single Answer)
Given: <%-- insert code here --%> Today is: <%= new Date() %> What needs to go on line 1?
- <%@ page import='java.util.Date' %>
- <%@ import class='java.util.Date' %>
- <%@ include file='java.util.Date' %>
- <%@ 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?
- An error occurs during page translation
- Translation is successful, but nothing is included in the response.
- Both "10 x 5 = 50" and "2 * 3 = 6" are included in the JSP response
- The text "10 x 5 = 50" is included in the JSP response, but "2 * 3 = 6" is NOT
- The text "2 * 3 = 6" is included in the JSP response, but "10 x 5 = 50" is NOT