問題詳情

121 You are building JSP pages that have a set of menus that are visible based on a user'ssecurity role. These menus are hand-crafted by your web-design team; for example, theSalesManager role has a menu in the file/WEB-INF/html/sales-mgr-menu.html.Which JSP code snippet should be used to make this menu visible to the user?
(A) <% if (request.isUserInRole ("SalesManager") ) { %><%@ include file='/WEB-INF/html/sales-mgr-menu.html' %><% } %>
(B) <jsp:if test= 'request.isUserInRole ("SalesManager") '><%@ include file'/WEB-INF/html/sales-mgr-menu.html' /%></jsp:if>
(C) <% if ( request.isUserInRole("SalesManager") ) { %><jsp:includefile='/WEB-INF/html/sales-mgr-menu.html' /><% } %>
(D) <jsp:if test= 'request.isUserInRole("SalesManager")'><jsp:include file'/WEB-INF/html/sales-mgr-menu.html' /></jsp:if>

參考答案

無參考答案

內容推薦