考题
Inwhichtwowebapplicationdirectoriescandependentclassesandlibrariesbelocated?()
A./WEB-INF/libasaJARfileB./META-INF/libasaJARfileC./classesascompiledclassfilesD./WEB-INF/libascompiledclassfilesE./WEB-INF/classesascompiledclassfilesF./META-INF/classesascompiledclassfiles
考题
WhichpathisrequiredtobepresentwithinaWARfile?()
A./classesB./index.htmlC./MANIFEST-INFD./WEB-INF/web.xmlE./WEB-INF/classesF./WEB-INF/index.htmlG./META-INF/index.xml
考题
Youaredevelopingseveraltaglibrariesthatwillbesoldfordevelopmentofthird-partywebapplications.YouareabouttopublishthefirstthreelibrariesasJARfiles:container-tags.jar,advanced-html-form-tags.jar,andbasic-html-form-tags.jar.WhichtwotechniquesareappropriateforpackagingtheTLDfilesforthesetaglibraries?()A.TheTLDmustbelocatedwithintheWEB-INFdirectoryoftheJARfile.B.TheTLDmustbelocatedwithintheMETA-INFdirectoryoftheJARfile.C.TheTLDmustbelocatedwithintheMETA-INF/tld/directoryoftheJARfile.D.TheTLDmustbelocatedwithinasubdirectoryofWEB-INFdirectoryoftheJARfile.E.TheTLDmustbelocatedwithinasubdirectoryofMETA-INFdirectoryoftheJARfile.
考题
GivenanHttpSessionsession.AServletRequestrequest.AndaServletContextcontext.WhichretrievesaURLto/WEBINF/myconfig.xmlwithinawebapplication?()
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”)
考题
AJSPpagecontainsataglibdirectivewhoseuriattributehasthevaluedbtags.WhichXMLelementwithinthewebapplicationdeploymentdescriptordefinestheassociatedTLD?()
A.tlduridbtags/urilocation/WEB-INF/tlds/dbtags.tld/location/tldB.tagliburidbtags/urilocation/WEB-INF/tlds/dbtags.tld/location./taglibC.tld.tld-uridbtags/tld-uri.tld-location/WEB-INF/tlds/dbtags.tld/tld-location./tldD.taglibtaglib-uridbtags/taglib-uritaglib-location/WEB-INF/tlds/dbtags.tld./taglib-location./taglib
考题
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:ifC.%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
考题
GivenanHttpSessionsession,aServletRequestrequest,andaServletContextcontext,whichretrievesaURLto/WEB-INF/myconfig.xmlwithinawebapplication?()
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)
考题
13、以下实例的输出结果是: tags=[[1,1,1],[2,2,2]] unique_tags=[tag for list in tags for tag in list] print(unique_tags)