package smp;
import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.ServletContext;
public class SampleListener implements ServletContextAttributeListener {
public void attributeAdded(ServletContextAttributeEvent ev) {
ServletContext sc = ev.getServletContext();
sc.log("追加属性名:" + ev.getName() + " 追加した属性値" + ev.getValue());
}
public void attributeRemoved(ServletContextAttributeEvent ev) {
ServletContext sc = ev.getServletContext();
sc.log("削除属性名:" + ev.getName() + " 削除した属性値" + ev.getValue());
}
public void attributeReplaced(ServletContextAttributeEvent ev) {
ServletContext sc = ev.getServletContext();
sc.log("変更属性名:" + ev.getName() + " 変更前の属性値" + ev.getValue());
}
}
|