A. Cookie cookie = new Cookie( String key, Object value ); B. Cookie cookie = new Cookie(); C. response.add(cookie ); D. response.addCookie(cookie);
A. request B. response C. session D. application
對(duì)如下JSP 代碼說法正確的是()。 <% Sring str = ”Hello.JBIT!”; session.setAttribute(“msg’,str); String getStr = session.getAttribute(“msg”); out.println(getStr); %>
A. 運(yùn)行成功,頁(yè)面上輸出Hello.JBIT; B. 運(yùn)行成功,頁(yè)面上輸出msg; C. 代碼行session.setAttribute(“msg’,str);有錯(cuò)誤,無法運(yùn)行 D. 代碼行String getStr = session.getAttribute(“msg”);有錯(cuò)誤,無法運(yùn)行