Package javax.servlet

Examples of javax.servlet.ServletContext.removeAttribute()


    //first set attribute
    context.setAttribute("Mankind","humane");

    //try removing it
    context.removeAttribute("Mankind");


    //try getting it,should get null

    if(context.getAttribute("Mankind")==null) {
View Full Code Here


        setState(LifecycleState.STOPPING);

        // Remove context attributes as appropriate
        ServletContext servletContext = context.getServletContext();
        servletContext.removeAttribute(Globals.CLASS_PATH_ATTR);

        // Throw away our current class loader
        if (classLoader != null) {
            ((Lifecycle) classLoader).stop();
        }
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
        if (classLoader instanceof Lifecycle)
            ((Lifecycle) classLoader).stop();
View Full Code Here

          + "--------------------------------------------------------------");
    }

    ServletContext servletContext = event.getServletContext();

    servletContext.removeAttribute(TobagoConfig.TOBAGO_CONFIG);

    ResourceManagerFactory.release(servletContext);

    //LogFactory.releaseAll();
//    LogManager.shutdown();
View Full Code Here

          + "--------------------------------------------------------------");
    }

    ServletContext servletContext = event.getServletContext();

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

    LogFactory.releaseAll();
//    LogManager.shutdown();
View Full Code Here

    ServletContext servletContext = event.getServletContext();

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

    LogFactory.releaseAll();
//    LogManager.shutdown();
  }
View Full Code Here

         * @see java.util.AbstractMap#remove(java.lang.Object)
         */
        public Object remove(Object key) {
            ServletContext context
                = request.getSession().getServletContext();
            context.removeAttribute((String)key);
            return backup().remove(key);
        }
    }

    public class InitParametersMap extends AbstractMap {
View Full Code Here

  public static final String MODULES_ATTRIBUTE = "guice-modules";
  public static final String INJECTOR_ATTRIBUTE = "guice-injector";

  public void contextDestroyed(ServletContextEvent event) {
    ServletContext context = event.getServletContext();
    context.removeAttribute(INJECTOR_ATTRIBUTE);
  }

  public void contextInitialized(ServletContextEvent event) {

    ServletContext context = event.getServletContext();
View Full Code Here

    }
  }

  public void contextDestroyed(ServletContextEvent event) {
    ServletContext context = event.getServletContext();
    context.removeAttribute(INJECTOR_ATTRIBUTE);
  }
}
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
        if (classLoader instanceof Lifecycle)
            ((Lifecycle) classLoader).stop();
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.