欢迎来到求知题库网 求知题库官网
logo
全部科目 > Java认证考试 > SCWCD(310-083)

单项选择题

Given the definition of MyServlet:
11.public class MyServlet extends HttpServlet {
12.public void service(HttpServletRequest request,
13.HttpServletResponse response)
14.throws ServletException, IOException {
15.HttpSession session = request.getSession();
16.session.setAttribute("myAttribute","myAttributeValue");
17.session.invalidate();
18.response.getWriter().println("value=" +
19.session.getAttribute("myAttribute"));
20.}
21.}
What is the result when a request is sent to MyServlet?()

    A.An IllegalStateException is thrown at runtime.
    B.An InvalidSessionException is thrown at runtime.
    C.The string "value=null" appears in the response stream.
    D.The string "value=myAttributeValue" appears in the response stream.

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题