Package javax.servlet

Examples of javax.servlet.ServletContext.removeAttribute()


    public void testSetAttributeToNull()
    {
        MockControl control = newControl(ServletContext.class);
        ServletContext context = (ServletContext) control.getMock();

        context.removeAttribute("tonull");

        replayControls();

        WebContext wc = new ServletWebContext(context);
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

        exporter.setServletContext(servletContext);
        exporter.setApplicationContext(applicationContext);
        exporter.setContextAttribute("att");
   
        servletContext.setAttribute("att", applicationContext);
        servletContext.removeAttribute("att");
       
        replay(servletContext);
       
        exporter.afterPropertiesSet();
        exporter.destroy();
View Full Code Here

        mapper.setServletContext(servletContext);
       
        //called with afterPropertiesSet
        servletContext.setAttribute(UrlPrefixRequestModuleMapper.PREFIX_HOLDER_KEY, mapper.getPrefixTreeHolder());
        //called with destroy
        servletContext.removeAttribute(UrlPrefixRequestModuleMapper.PREFIX_HOLDER_KEY);
       
        replay(servletContext);
       
        mapper.afterPropertiesSet();
        mapper.destroy();
View Full Code Here

    started = false;

    // 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

        // 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

        // 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

     * running.
     */
    public void removeAttribute(String name) {
        ServletContext delegatee = getServletContext();
        if (delegatee != null) {
            delegatee.removeAttribute(name);
        }
    }

    /**
     * Sets the name servlet context attribute to the requested value. This
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

        // 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.