Package javax.servlet

Examples of javax.servlet.ServletContext.removeAttribute()


    application.setAttribute(ActivityList.NAME, new ActivityList());
  }

  public void contextDestroyed(ServletContextEvent event) {
    final ServletContext application = event.getServletContext();
    application.removeAttribute(ActivityList.NAME);
  }
}
View Full Code Here


    if (LOG.isInfoEnabled()) {
      LOG.info("*** contextDestroyed ***\n"
          + "--- snip -----------------------------------------------------------------------");
    }

    servletContext.removeAttribute(TobagoConfig.TOBAGO_CONFIG);
    ResourceManagerFactory.release(servletContext);

    // theme config cache
    ThemeConfig.shutdown(servletContext);

View Full Code Here

        ServletConfig config = getServletConfig();
        ServletContext context = getServletContext();
        String attr = config.getInitParameter(CONFIG_ATTR);
        if (attr != null) {
            context.removeAttribute(attr);
        }
        CatalogFactory.clear();

    }
View Full Code Here

    public void contextDestroyed(ServletContextEvent event) {

        ServletContext context = event.getServletContext();
        String attr = context.getInitParameter(CONFIG_ATTR);
        if (attr != null) {
            context.removeAttribute(attr);
        }
        CatalogFactory.clear();

    }
View Full Code Here

        ELInterpreter interpreter =
                ELInterpreterFactory.getELInterpreter(context);
        Assert.assertNotNull(interpreter);
        Assert.assertTrue(interpreter instanceof DefaultELInterpreter);

        context.removeAttribute(ELInterpreter.class.getName());

        context.setAttribute(ELInterpreter.class.getName(),
                SimpleELInterpreter.class.getName());
        interpreter = ELInterpreterFactory.getELInterpreter(context);
        Assert.assertNotNull(interpreter);
View Full Code Here

                SimpleELInterpreter.class.getName());
        interpreter = ELInterpreterFactory.getELInterpreter(context);
        Assert.assertNotNull(interpreter);
        Assert.assertTrue(interpreter instanceof SimpleELInterpreter);

        context.removeAttribute(ELInterpreter.class.getName());

        SimpleELInterpreter simpleInterpreter = new SimpleELInterpreter();
        context.setAttribute(ELInterpreter.class.getName(), simpleInterpreter);
        interpreter = ELInterpreterFactory.getELInterpreter(context);
        Assert.assertNotNull(interpreter);
View Full Code Here

        interpreter = ELInterpreterFactory.getELInterpreter(context);
        Assert.assertNotNull(interpreter);
        Assert.assertTrue(interpreter instanceof SimpleELInterpreter);
        Assert.assertTrue(interpreter == simpleInterpreter);

        context.removeAttribute(ELInterpreter.class.getName());

        ctx.stop();
        ctx.addApplicationListener((new ApplicationListener(
                Bug54239Listener.class.getName(), false)));
        ctx.start();
View Full Code Here

    application.setAttribute(ActivityList.NAME, new ActivityList());
  }

  public void contextDestroyed(ServletContextEvent event) {
    final ServletContext application = event.getServletContext();
    application.removeAttribute(ActivityList.NAME);
  }
}
View Full Code Here

        // Remove context attributes as appropriate
        if (container instanceof Context) {
            ServletContext servletContext =
                ((Context) container).getServletContext();
            servletContext.removeAttribute(Globals.CLASS_PATH_ATTR);
        }

        // Throw away our current class loader
        ((Lifecycle) classLoader).stop();
        DirContextURLStreamHandler.unbind(classLoader);
View Full Code Here

            // this will do things like remove MBeans that might be registered to the JVM
            GuiceServletContextListener.CleanupHandler cleanups = injector.getInstance(GuiceServletContextListener.CleanupHandler.class);
            cleanups.cleanup();
        }

        context.removeAttribute(GuiceServletContextListener.INJECTOR_ATTRIBUTE);
    }

    private static void overrideInjector(Injector injector, ServletContext context) {
        context.setAttribute(GuiceServletContextListener.INJECTOR_ATTRIBUTE, injector);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.