위로 아래

Listener API

서블릿에서 발생하는 이벤트에 대해 적절한 처리를 해주는 여러가지 리스너를 제공

서블릿 관련 Listener 추상 메소드 기능
ServletContextAttributeListener attributeAdded()
attributeRemoved()
attributeReplaced()
Context 객체에 속성 추가/제거/수정 이벤트 발생 시 처리
HttpSessionListener sessionCteated()
sessionDestroyed()
세션 객체의 생성/소멸 이벤트 발생 시 처리
ServletRequestListener requestInitialized()
requestDestroyed()
클라이언트의 요청 이벤트 발생 시 처리
ServletRequestAttributeListener attributedAdded()
attributedRemoved()
attributeReplaced()
요청 객체에 속성 추가/제거/수정 이벤트 발생 시 처리
HttpSessionBindingListener valueBound()
valueUnbound()
세션에 바인딩/언바인딩된 객체를 알려주는 이벤트 발생 시 처리
HttpSessionAttributeListener attributedAdded()
attributedRemoved()
attributeReplaced()
세션에 속성 추가/제거/수정 이벤트 발생 시 처리
ServletContextListener contextInitialized()
contextDestoyed()
컨텍스트 객체의 생성/소멸 이벤트 발생 시 처리
HttpSessionActivationListener sessionDidActivate()
sessionWillPassivate()
세션의 활성화/비활성화 이벤트 발생 시 처리