A.A
B.B
C.C
D.D
第1题
ahomeinterfaceofcom.example.AccountHomeandaJNDIreferenceofejb/Account.WhichmakesthelocalEJBcomponentaccessibletothewebcomponentsinthewebapplicationdeploymentdescriptor?()
A.
B.
C.
D.
第2题
youwanttoclearoutthissetofattributesfromthesessionobject.Assumethatthisstaticvariableholdsthissetofattributenames:201.privatestaticfinalSetUSE_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);
第3题
23.//insertcodehere24.Stringname=(String)session.getAttribute("name");Whichthreecanbeplacedatline23toretrieveanexistingHttpSessionobject?()
A.HttpSessionsession=request.getSession();
B.HttpSessionsession=request.getSession(id);
C.HttpSessionsession=request.getSession(true);
D.HttpSessionsession=request.getSession(false);
E.HttpSessionsession=request.getSession("jsessionid");
第4题
A.A
B.B
C.C
D.D
第5题
A.floatTsquare=session.getFloatAttribute("Tsquare");
B.floatTsquare=(Float)session.getAttribute("Tsquare");
C.floatTsquare=(float)session.getNumericAttribute("Tsquare");
D.floatTsquare=((Float)session.getAttribute.("Tsquare")).floatValue();
E.floatTsquare=((Float)session.getFloatAttribute.("Tsquare")).floatValue;
第6题
A.sessionconfiguration
B.MIMEtypemappings
C.contextrootfortheapplication
D.servletinstancepoolconfiguration
E.webcontainerdefaultportbindings
F.ServletContextinitializationparameters
第8题
A.thewebapplicationdeploymentdescriptor
B.the/META-INF/dependencies.xmlfile
C.the/META-INF/MANIFEST.MFmanifestfile
D.the/META-INF/MANIFEST.MFmanifestofaJARinthewebapplicationclasspath
第9题
A.ServletConfig
B.ServletContext
C.HttpServletRequest
D.HttpServletResponse
第10题
eservletshavebecomeratherdifficulttomaintainbecausetherequestprocessingmethodshavebecomeverylarge.Thereisalsocommonprocessingcodeinmanyservletsbecausetheseusecasesareverysimilar.Whichtwodesignpatternscanbeusedtogethertorefactorandsimplifythiswebapplication?()
A.Proxy
B.ViewHelper
C.FrontController
D.SessionFacade
E.BusinessDelegate
F.Model-View-Controller
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!