@@ -0,0 +1,1115 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage edu.ccsu;%0A%0Aimport javax.servlet.annotation.WebListener;%0Aimport javax.servlet.http.HttpSessionAttributeListener;%0Aimport javax.servlet.http.HttpSessionBindingEvent;%0A%0A/**%0A * Web application lifecycle listener.%0A *%0A * @author cw1491%0A */%0A@WebListener()%0Apublic class SessionAttributeListener implements HttpSessionAttributeListener %7B%0A%0A    @Override%0A    public void attributeAdded(HttpSessionBindingEvent event) %7B%0A       event.getSession().getServletContext().log(%22Session Attribute created %22+event.getName()+%22=%22+event.getValue());%0A    %7D%0A%0A    @Override%0A    public void attributeRemoved(HttpSessionBindingEvent event) %7B%0A       event.getSession().getServletContext().log(%22Session Attribute removed %22+event.getName());%0A    %7D%0A%0A    @Override%0A    public void attributeReplaced(HttpSessionBindingEvent event) %7B%0A       event.getSession().getServletContext().log(%22Session Attribute changed %22+event.getName()+%22=%22+event.getValue());%0A    %7D%0A%7D%0A

Add example session attribute listener