java web程序设计教程范立锋 最后的图书馆理系统_JavaWeb程序设计 习题参考答案(第7章)...

第七章 监听和过滤

1、调用ServletContext的getAttribute()方法时,会触发哪个方法调用?(假设有关联的监听器)

A、ServletContextAttributerListener的attributeAdded()方法

B、ServletContextAttributeListener的attributeRemove()方法

C、 ServletContextAttributerListener的attributeReplace()

D、不会调用任何监听方法

参考答案:D

2、调用HttpSession的removeAttribute()方法时,会触发哪个方法调用?(假设有关联的监听器)

A、HttpSessionListener的attributeRemove()方法

B、HttpSessionActivateionListener的attributeRemove()方法

C、 HttpSessionBindingListener的attributeRemove()

D、 HttpSessionAttributerListener的attributeRemove

参考答案:D

3、调用HttpServletRequest的setAttribute()方法时,会触发哪个方法调用?(假设有关联的监听器)

A、ServletRequestAttributeListener的attributeAdded()方法

B、ServletRequestAttributeListene的attributeReplaced()方法

C、 ServletRequestAttributeListene的attributeRemove()方法

D、ServletRequestAttributeListene的attributeSetted()方法

参考答案:A

4、在web.xml中使用什么元素配置监听器

A、

B、

C、 和

D、 和

参考答案:B

5、下述代码定义了两个过滤器

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值