试题详情
- 单项选择题 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.
- A
关注下方微信公众号,在线模考后查看
热门试题
- Which two̳
- public class&e
- 运行时,数组以哪种方式存在?()Q
- public class&e
- 下面哪种情况会导致持久区jvm堆内存溢出
- 创建一个服务器,用它请求用户输入密码,然
- 1.public classA{ 2.
- Which two
- What is th
- String s=&ensp
- Which statemen
- Given: 8.int&
- 现有: pub
- 程序: class&ens
- 数据类型包装类与基本数据类型有什么关系?
- int index&ensp
- 编写一个字符界面的JavaApplica
- 1.class SuperF
- 下面代码的输出结果是什么()。
- ++op运算符的作用是先将变量的值加1再