阿摩線上測驗 登入

試題詳解

試卷:無年度 - Java EE 6 Web Component Developer Certified Expert Exam:1z0-899 (101-132)#84682 | 科目:OCE

試卷資訊

試卷名稱:無年度 - Java EE 6 Web Component Developer Certified Expert Exam:1z0-899 (101-132)#84682

科目:OCE

121 You are building JSP pages that have a set of menus that are visible based on a user's security role. These menus are hand-crafted by your web-design team; for example, the SalesManager 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:include file='/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>
正確答案:登入後查看