A.session.getResource("/WEB-INF/myconfig.xml")
B.request.getResource("/WEB-INF/myconfig.xml")
C.context.getResource("/WEB-INF/myconfig.xml")
D.getClass().getResource("/WEB-INF/myconfig.xml")
第1题:
A./classes
B./index.html
C./MANIFEST-INF
D./WEB-INF/web.xml
E./WEB-INF/classes
F./WEB-INF/index.html
G./META-INF/index.xml
第2题:
Awebapplicationcontainsatagfilecalledbeta.tagin/WEB-INF/tags/alpha.AJSPpagecalledsort.jspexistsinthewebapplicationandcontainsonlythisJSPcode:1.<%@taglibprefix="x"2.tagdir="/WEB-INF/tags/alpha"%>3.<x:beta/>Thesort.jsppageisrequested.Whichtwoaretrue?()
A.Tagfilescanonlybeaccessedusingatagdirattribute.
B.Thesort.jsppagetranslatessuccessfullyandinvokesthetagdefinedbybeta.tag.
C.Thesort.jsppageproducesatranslationerrorbecauseataglibdirectivemustalwayshaveauriattribute.
D.Tagfilescanonlybeplacedin/WEB-INF/tags,andNOTinanysubdirectoriesof/WEB-INF/tags.
E.Thetagdirattributeinline2canbereplacedbyauriattributeifaTLDreferringtobeta.tagiscreatedandaddedtothewebapplication.
第3题:
YouarebuildingJSPpagesthathaveasetofmenusthatarevisiblebasedonauser’ssecurityrole.Thesemenusarehand-craftedbyyourwebdesignteam;forexample,theSalesManagerrolehasamenuinthefile/WEB-INF/html/sales-mgr-menu.html.WhichJSPcodesnippetshouldbeusedtomakethismenuvisibletotheuser?()
A.<%if(request.isUserInRole("SalesManager")){%><%@includefile=’/WEB-INF/html/sales-mgr-menu.html’%><%}%>
B.<jsp:iftest=’request.isUserInRole("SalesManager")’><%@includefile=’/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:iftest=’request.isUserInRole("SalesManager")’><jsp:includefile=’/WEB-INF/html/sales-mgr-menu.html’/></jsp:if>
第4题:
A.session.getResource(“/WEB-INF/myconfig.xml”)
B.request.getResource(“/WEB-INF/myconfig.xml”)
C.context.getResource(“/WEB-INF/myconfig.xml”)
D.getClass().getResource(“/WEB-INF/myconfig.xml”)
第5题:
A.<tld><uri>dbtags</uri><location>/WEB-INF/tlds/dbtags.tld</location></tld>
B.<taglib><uri>dbtags</uri><location>/WEB-INF/tlds/dbtags.tld</location>.</taglib>
C.<tld>.<tld-uri>dbtags</tld-uri>.<tld-location>/WEB-INF/tlds/dbtags.tld</tld-location>.</tld>
D.<taglib><taglib-uri>dbtags</taglib-uri><taglib-location>/WEB-INF/tlds/dbtags.tld.</taglib-location>.</taglib>