Package javax.servlet

Examples of javax.servlet.Servlet.destroy()


   public synchronized void unloadServlet(String urlPat)
   {
      Servlet servlet = (Servlet) registry.remove(urlPat)[0];
      if (servlet != null)
         servlet.destroy(); // sessions associated with it have to be invalidated to free up any the servlet specific object
      // TODO decide if UnavailableException should be thrown at access
   }

   // / Register a standard set of Servlets. These will return
   // files or directory listings, and run CGI programs, much like a
View Full Code Here


    public void destroy()
    {
        final Servlet servlet = dispatcher.getServlet();
        final ServletConfig cfg = servlet.getServletConfig();
        final ServletContext context = cfg != null ? cfg.getServletContext() : null;
        servlet.destroy();
        if (context != null) {
          contextManager.ungetServletContext(context);
        }
        registrations.removeServlet(servlet);
    }
View Full Code Here

        servlet = null;
      }
    }

    if (servlet != null)
      servlet.destroy();
  }
}
View Full Code Here

                            SecurityUtil.doAsPrivilege("destroy", s);
                        } finally {
                            SecurityUtil.remove(s);
                        }
                    } else {
                        s.destroy();
                    }
                    // Annotation processing
                    if (!((Context) getParent()).getIgnoreAnnotations()) {
                       ((StandardContext)getParent()).getInstanceManager().destroyInstance(s);
                    }
View Full Code Here

        } finally {

            // clean up temporary fields
            if (tmpDelegatee != null) {
                tmpDelegatee.destroy();
            }
            if (tmpSling != null) {
                tmpSling.destroy();
            }
        }
View Full Code Here

                    Servlet s = (Servlet) instancePool.pop();
                    if (Globals.IS_SECURITY_ENABLED) {
                        SecurityUtil.doAsPrivilege("destroy", s);
                        SecurityUtil.remove(instance);                          
                    } else {
                        s.destroy();
                    }
                    // Annotation processing
                    if (!((Context) getParent()).getIgnoreAnnotations()) {
                       ((StandardContext)getParent()).getAnnotationProcessor().preDestroy(s);
                    }
View Full Code Here

                    Servlet s = (Servlet) instancePool.pop();
                    if (Globals.IS_SECURITY_ENABLED) {
                        SecurityUtil.doAsPrivilege("destroy", s);
                        SecurityUtil.remove(instance);                          
                    } else {
                        s.destroy();
                    }
                    // Annotation processing
                    if (!((Context) getParent()).getIgnoreAnnotations()) {
                       ((StandardContext)getParent()).getAnnotationProcessor().preDestroy(s);
                    }
View Full Code Here

                    Servlet s = (Servlet) instancePool.pop();
                    if (Globals.IS_SECURITY_ENABLED) {
                        SecurityUtil.doAsPrivilege("destroy", s);
                        SecurityUtil.remove(instance);                          
                    } else {
                        s.destroy();
                    }
                    // Annotation processing
                    if (!((Context) getParent()).getIgnoreAnnotations()) {
                       ((Context) getParent()).getInstanceManager().destroyInstance(s);
                    }
View Full Code Here

                    Servlet s = (Servlet) instancePool.pop();
                    if (Globals.IS_SECURITY_ENABLED) {
                        SecurityUtil.doAsPrivilege("destroy", s);
                        SecurityUtil.remove(instance);                          
                    } else {
                        s.destroy();
                    }
                    // Annotation processing
                    if (!((Context) getParent()).getIgnoreAnnotations()) {
                       ((StandardContext)getParent()).getInstanceManager().destroyInstance(s);
                    }
View Full Code Here

    throws Exception
    {
        if (o==null)
            return;
        Servlet servlet =  ((Servlet)o);
        servlet.destroy();
        getServletHandler().customizeServletDestroy(servlet);
    }

    /* ------------------------------------------------------------ */
    /** Get the servlet.
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.