1. 关于Listener,下列说法错误的是( )。 [单选题] *
Listener针对事件源实现监听。 |
Listener程序必须实现Listener接口。 |
Listener程序无须在web.xml文件中配置。(正确答案) |
在客户端和服务器的一次会话中,可能会触发多个Listener。 |
2. 下列接口中,不属于监听域对象的创建和销毁的是( )。 [单选题] *
ServletContextListener接口 |
HttpSessionListener接口 |
ServletRequestListener接口 |
HttpSessionBindingListener接口(正确答案) |
3. 在ServletContextAttributeListener接口的方法中,用于监听属性删除的是( )。 [单选题] *
attributeAdded() |
attributeRemoved()(正确答案) |
attributeReplaced() |
contextDestroyed() |
4. 在HttpSessionActivationListener接口中的方法,用于监听相关对象钝化的是( )。 [单选题] *
WillPassivate()(正确答案) |
DidActivate() |
valueBound() |
valueUnbound() |
5. 在HttpRequestListener接口的方法中,用于监听ServletRequest对象销毁的是( )。 [单选题] *
requestInitialized() |
requestDestroyed()(正确答案) |
attributeAdded() |
attributeReplaced() |
6. 下列不属于Servlet监听器类型的是() [单选题] *
Servlet上下文监听 |
HTTP会话监听 |
Servlet请求监听 |
Servlet容器监听(正确答案) |
7. 下面选项中,用于监听ServletContext对象中属性变更的接口是() [单选题] *
HttpSessionAttributeListener |
ServletContextAttributeListener(正确答案) |
ServletRequestAttributeListener |
ApplicationAttributeListener |
8. 在HttpSessionListener接口中,当HttpSession对象被创建时将调用的方法是() [单选题] *
sessionCreated()(正确答案) |
initializedSession () |
destroyedSession() |
sessionDestroyed() |
9. HttpSession对象被销毁时,将调用HttpSessionListener接口中的sessionCreated ()方法。[判断题] *
对 |
错(正确答案) |