Package javax.servlet

Examples of javax.servlet.ServletContext.removeAttribute()


     * @param context the servlet context to unregister from
     */
    public void unregisterRepository(ServletContext context) {
        ServletContext remote = getRemoteContext(context);
        if (remote != null) {
            remote.removeAttribute(KEY);
        }
    }

    /**
     * Find a repository for the given context
View Full Code Here


       
        ServletContext sc = getServletContext();
       
        result = sc.getAttribute(name);
       
        sc.removeAttribute(name);

        return result;
    }

    /**
 
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 the cache from context and clear the cache
        Cache cache = (Cache)context.getAttribute(Constants.JSPTAG_CACHE_KEY);

        if (cache != null) {
            context.removeAttribute(Constants.JSPTAG_CACHE_KEY);
            cache.clear();
        }
    }
}
View Full Code Here

            try {
                cm.stop();
                if (_debugLog) {
                    _logger.fine("Cache Manager stopped");
                }
                ctxt.removeAttribute(CacheManager.CACHE_MANAGER_ATTR_NAME);
            } catch (LifecycleException ee) {
                _logger.log(Level.WARNING, ee.getMessage(), ee.getThrowable());
            }
        }
    }
View Full Code Here

                    (ServletAdapterList) servletContext.getAttribute("ADAPTER_LIST");
            if(list != null) {
                for(ServletAdapter x : list) {
                    x.getEndpoint().dispose();
                }
                servletContext.removeAttribute("ADAPTER_LIST");
            }
            JAXWSAdapterRegistry.getInstance().removeAdapter(contextRoot);
            /*
            Fix for bug 3932/4052 since the x.getEndpoint().dispose is being
           called above we do not need to call this explicitly
View Full Code Here

                                    new Object[]{handler.getClass(), x.getEndpoint().getServiceName(), e.getMessage()});
                            continue;
                        }
                    }
               }
                servletContext.removeAttribute("ADAPTER_LIST");
            }
            JAXWSAdapterRegistry.getInstance().removeAdapter(contextRoot);
                /*
                 Fix for bug 3932/4052 since the x.getEndpoint().dispose is being
                 called above we do not need to call this explicitly
View Full Code Here

      NonCoreContract startupContract = NonCoreContract
          .getNonCoreContract("shutdown");
      List<Object> args = new ArrayList<Object>();
      args.add(context);
      startupContract.callFunction("on_shut_down", args.toArray());
      context.removeAttribute(CONTEXT_REQUEST_MAP);
    } catch (Throwable e) {
      Debug.print("Problem. " + HttpException.getStackTraceString(e));
      throw new RuntimeException(e);
    }
  }
View Full Code Here

        ServletContext servletContext = getServletContext();
       
        for ( Iterator ii = _registeredModules.keySet().iterator(); ii.hasNext();
        {
            String modulePrefix = ( String ) ii.next();
            servletContext.removeAttribute( Globals.MODULE_KEY + modulePrefix );
        }
       
        _registeredModules.clear();
    }
   
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

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.