Şu satırı dahil ederiz
import javax.servlet.ServletRequestListener;
Açıklaması şöyle
Interface for receiving notification events about a ServletRequest coming into and going out of the scope of a web application.
Örnek
Şöyle yaparız
@WebListener
public class MyRequestListener implements ServletRequestListener {
@Override
public void requestInitialized(ServletRequestEvent event) {
System.out.println("Request initialized");
}
@Override
public void requestDestroyed(ServletRequestEvent event) {
System.out.println("Request destroyed");
}
}
Hiç yorum yok:
Yorum Gönder