Ejemplo n.º 1
0
 public void attributeReplaced(ServletContextAttributeEvent evt) {
   final String name = evt.getName();
   if (!shallIgnore(name)) {
     final WebApp wapp = WebManager.getWebAppIfAny(evt.getServletContext());
     if (wapp instanceof SimpleWebApp)
       ((SimpleWebApp) wapp).getScopeListeners().notifyReplaced(name, evt.getValue());
   }
 }
Ejemplo n.º 2
0
 public void sessionDestroyed(HttpSessionEvent evt) {
   // Note: Session Fixation Protection (such as Spring Security)
   // might invalidate HTTP session and restore with a new one.
   // Thus, we use an attribute to denote this case and avoid the callback
   final HttpSession hsess = evt.getSession();
   if (hsess.getAttribute(Attributes.RENEW_NATIVE_SESSION) == null)
     WebManager.sessionDestroyed(hsess);
 }
Ejemplo n.º 3
0
 public void contextInitialized(ServletContextEvent event) {
   /*
    * From latest servlet specification:
    * All ServletContextListeners are notified of context initialization
    * before any filters or servlets in the web application are initialized.
    *
    * The servlet specification of Version 2.3 only provide the description
    * "Notification that the web application is ready to process requests.",
    * the order of initialization of listeners and servlets
    * may not guaranteed in older servlet version.
    *
    * @since 6.0.1
    */
   final ServletContext ctx = event.getServletContext();
   if (WebManager.getWebManagerIfAny(ctx) == null) {
     _webman = new WebManager(ctx, "/zkau");
     _webmanCreated = true;
   }
 }
Ejemplo n.º 4
0
 public void contextDestroyed(ServletContextEvent arg0) {
   if (_webman != null) {
     if (_webmanCreated) _webman.destroy();
     _webman = null;
   }
 }