A.Accesstosession-scopedattributesisguaranteedtobethread-safebythewebcontainer.
B.ToactivateURLrewriting,thedevelopermustusetheHttpServletResponse.setURLRewritingmethod.
C.IfthewebapplicationusesHTTPS,thenthewebcontainermayusethedataontheHTTPSrequest streamtoidentifytheclient.
D.TheJSESSIONIDcookieisstoredpermanentlyontheclientsothatausermayreturntotheweb applicationandthewebcontainerwillrejointhatsession.
第1题
youwanttoclearoutthissetofattributesfromthesessionobject.Assumethatthisstaticvariableholdsthissetofattributenames:201.privatestaticfinalSet<String>USE_CASE_ATTRS;202.static{203.USE_CASE_ATTRS.add("customerOID");204.USE_CASE_ATTRS.add("custMgrBean");205.USE_CASE_ATTRS.add("orderOID");206.USE_CASE_ATTRS.add("orderMgrBean");207.}Whichcodesnippetdeletestheseattributesfromthesessionobject?()
A.session.removeAll(USE_CASE_ATTRS);
B.for(Stringattr:USE_CASE_ATTRS){session.remove(attr);}
C.for(Stringattr:USE_CASE_ATTRS){session.removeAttribute(attr);}
D.for(Stringattr:USE_CASE_ATTRS){session.deleteAttribute(attr);}
E.session.deleteAllAttributes(USE_CASE_ATTRS);
第2题
1.classA{2.publicbytefileNumber(){3.returnl;4.}5.}6.7.ClassBextendsA{8.publicshortgetNumber(){9.return2;10.}11.12.publicshortgetNumber(){13.Bb=newB();14.System.out.printIn(b.getNumber());15.}16.}Whatistheresult()?
A.Compilationsucceedsandlisprinted.
B.Compilationsucceedsand2printed.
C.Anerroratline8causecompilationtofail.
D.Anerroratline14causecomplicationtofail.
E.Complicationsucceedsbutanexceptionisthrownatline14.
第3题
esandexecutesthetagbodyonceforeachheadline.ExposesaNESTEDpagescopedattributecalledheadlineoftypecom.example.Headlinecontainingdetailsforthatheadline.itemOutputstheHTMLforasinglenewsheadline.Acceptsanattributeinfooftypecom.example.Headlinecontainingdetailsfortheheadlinetoberendered.WhichsnippetofJSPcodereturnsthelatestnewsheadlinesinanHTMLtable,oneperrow?()
A.
B.
C.
D.
第4题
A.<ahref=’<c:urlurl="foo.jsp"/>’/>
B.<ahref=’<c:linkurl="foo.jsp"/>’/>
C.<ahref=’<c:urlvalue="foo.jsp"/>’/>
D.<ahref=’<c:linkvalue="foo.jsp"/>’/>
第5题
B.${requestScope[’priority’]=’medium’}
C.<c:setvar="priority"value="medium"/>
D.<c:setvar="priority"scope="request">medium</c:set>
E.<c:setvar="priority"value="medium"scope="request"/>
第6题
ectionofdata.Thisdatacanbedisplayedinseveraldifferentwayssothearchitectonyourprojectdecidedtocreateagenericservletthatgeneratesacomma-delimitedstringsothatvariouspagescanrenderthedataindifferentways.Thisservlettakesonrequestparameter:objectID.AssumethatthisservletismappedtotheURLpattern:/WEB-INF/data.IntheJSPyouarecreating,youneedtosplitthisstringintoitselementsseparatedbycommasandgenerateanHTMLlistfromthedata.WhichJSTLcodesnippetwillaccomplishthisgoal?()
第7题
tethatdecision,youarerequiredtocreateallJSPsusingtheJSPDocumentformat.Inthe reviewOrder.jspxpage,youneedtouseseveralcoreJSTLtagstoprocessthecollectionoforderitemsinthecustomer’sshoppingcart.WhichJSPcodesnippetsmustyouuseinthereviewOrder.jspxpage?()
A.
B.
C.
D.
第9题
A.Createausercalledvipinthesecurityrealm
B.Defineagroupwithinthesecurityrealmandcallitvip
C.Defineasecurity-rolenamedvipinthedeploymentdescriptor
D.Declareasecurity-role-refforvipinthedeploymentdescripto
第10题
etResponseresp)throwsServletException,IOException{5.//servletcodehere...26.}27.}IftheDDcontainsasinglesecurityconstraintassociatedwithMyServletanditsonly<httpmethod>tagsand<auth-constraint>tagsare:<http-method>GET</http-method><http-method>PUT</http-method><auth-constraint>Admin</auth-constraint>Whichfourrequestswouldbeallowedbythecontainer?()
A.AuserwhoseroleisAdmincanperformaPUT.
B.AuserwhoseroleisAdmincanperformaGET.
C.AuserwhoseroleisAdmincanperformaPOST.
D.AuserwhoseroleisMembercanperformaPUT.
E.AuserwhoseroleisMembercanperformaPOST.
F.AuserwhoseroleisMembercanperformaGET.
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!