单项选择题

以下哪条语句能够将session中的属性key删除?()

A.session.unbind("key");
B.session.remove("key");
C.session.removeAttribute("key");
D.session.unbindAttribute("key");

<上一题 目录 下一题>
热门 试题

单项选择题
阅读下面代码片段(其中login.jsp页面在WebContext目录下):Servlet1:request.setAttribute( company , XXX有限公司 );RequestDispatcherdispatcher=request.getRequestDispatcher( login.jsp );dispatcher.forward(request,response);login.jsp:hello${company}当使用浏览器访问Servlet1时会什么结果?()

A.页面跳转失败
B.页面结果显示为:hello${company}
C.页面跳转错误,程序出现异常
D.正常跳转,页面显示为:helloXXX有限公司

单项选择题
下面关于配置web默认页面index.html的说法中,正确的是()。

A.<welcome-file-list><welcome-files>index.html</welcome-files></welcome-file-list>
B.<welcome-file-lists><welcome-file>index.html</welcome-file></welcome-file-lists>
C.<welcome-file-list><welcome-file>index.html</welcome-file></welcome-file-list>
D.<welcome-file-lists><welcome-files>index.html</welcome-files></welcome-file-lists>

相关试题
  • 关闭数据库连接的方法是()
  • 提交事物的方法是()
  • 关闭自动提交模式的方法是()
  • 回滚事务的方法是()
  • 如果数据库中某个字段为float类型,可以通...