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);
第1题
GivenanHttpServletRequestrequest:22.Stringid=request.getParameter("jsessionid");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");
第2题
A.A
B.B
C.C
D.D
第3题
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;
第4题
A.sessionconfiguration
B.MIMEtypemappings
C.contextrootfortheapplication
D.servletinstancepoolconfiguration
E.webcontainerdefaultportbindings
F.ServletContextinitializationparameters
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!