下面选项中,能够用于监听域对象属性增加和删除的事件监听器的是( )
A. 实现ServletContextAttributeListener接口的类
B. 实现ServletRequestAttributeListener接口的类
C. 实现HttpSessionBindingListener接口的类
D. 实现HttpSessionAttributeListener接口的类
查看答案
下面选项中,属于过滤器Filter接口中包含的方法有( )
A. init(FilterConfig filterConfig)
B. doFilter(ServletRequest req,ServletResponse resp,FilterChain chain)
C. destroy()
D. service(ServletRequest req,ServletResponse resp,FilterChain chain)
下列关于匹配子元素的请求URL,书写正确的有( )
A. /helloServlet
B. /*.action
C. /*
D. *.action
已知有如下的Filter配置信息:MyFilterMyFiltercn.itcast.chapter04.filter.MyFilterMyFilter/servlet/* 则下列选项中,该Filter可以拦截的URL是( )
A. http://localhost:8080/chapter04/MyServlet
B. http://localhost:8080/chapter04/servlet/MyServlet
C. http://localhost:8080/chapter04/servlet01/MyServlet
D. http://localhost:8080/chapter04/servlet/01/MyServlet
在JSP页面中有如下代码:<%getServletContext().setAttribute("username", "itcast");getServletContext().setAttribute("username", "itheima");getServletContext().removeAttribute("username");%>则 ServletContextAttributeListener监听器中依次调用的方法是()
A. attributeReplaced()
B. attributeAdded()
C. attributeDeleted()
D. attributeRemoved()