Examples of ServletContextEvent


Examples of javax.servlet.ServletContextEvent

   }
  
   @After
   public void after()
   {
      new MarkupContextListener().contextDestroyed(new ServletContextEvent(context));
   }
View Full Code Here

Examples of javax.servlet.ServletContextEvent

   }
  
   @After
   public void after()
   {
      new MarkupContextListener().contextDestroyed(new ServletContextEvent(context));
   }
View Full Code Here

Examples of javax.servlet.ServletContextEvent

   }
  
   @After
   public void after()
   {
      new MarkupContextListener().contextDestroyed(new ServletContextEvent(context));
   }
View Full Code Here

Examples of javax.servlet.ServletContextEvent

   }

   @After
   public void after()
   {
      new MarkupContextListener().contextDestroyed(new ServletContextEvent(context));
   }
View Full Code Here

Examples of javax.servlet.ServletContextEvent

    @Test
    public void injectsTheMetricRegistryIntoTheServletContext() throws Exception {
        final ServletContext context = mock(ServletContext.class);

        final ServletContextEvent event = mock(ServletContextEvent.class);
        when(event.getServletContext()).thenReturn(context);

        listener.contextInitialized(event);

        verify(context).setAttribute("com.codahale.metrics.servlet.InstrumentedFilter.registry", registry);
    }
View Full Code Here

Examples of javax.servlet.ServletContextEvent

    @Before
    public void setup() {
        mockServletContext = new MockServletContext("test");
        mockServletContext.addInitParameter("contextConfigLocation", "../test-applicationContext.xml");
        servletContextEvent = new ServletContextEvent(mockServletContext);

        raveContextLoaderListener = new RaveContextLoaderListener();
    }
View Full Code Here

Examples of javax.servlet.ServletContextEvent

            getLogger().debug("Sending application start events");

        Object instances[] = getApplicationLifecycleListeners();
        if (instances == null)
            return (ok);
        ServletContextEvent event =
          new ServletContextEvent(getServletContext());
        for (int i = 0; i < instances.length; i++) {
            if (instances[i] == null)
                continue;
            if (!(instances[i] instanceof ServletContextListener))
                continue;
View Full Code Here

Examples of javax.servlet.ServletContextEvent

            log.debug("Sending application stop events");

        boolean ok = true;
        Object listeners[] = getApplicationLifecycleListeners();
        if (listeners != null) {
            ServletContextEvent event =
                new ServletContextEvent(getServletContext());
            for (int i = 0; i < listeners.length; i++) {
                int j = (listeners.length - 1) - i;
                if (listeners[j] == null)
                    continue;
                if (listeners[j] instanceof ServletContextListener) {
View Full Code Here

Examples of javax.servlet.ServletContextEvent

            getLogger().debug("Sending application start events");

        Object instances[] = getApplicationLifecycleListeners();
        if (instances == null)
            return (ok);
        ServletContextEvent event =
          new ServletContextEvent(getServletContext());
        for (int i = 0; i < instances.length; i++) {
            if (instances[i] == null)
                continue;
            if (!(instances[i] instanceof ServletContextListener))
                continue;
View Full Code Here

Examples of javax.servlet.ServletContextEvent

            log.debug("Sending application stop events");

        boolean ok = true;
        Object listeners[] = getApplicationLifecycleListeners();
        if (listeners != null) {
            ServletContextEvent event =
                new ServletContextEvent(getServletContext());
            for (int i = 0; i < listeners.length; i++) {
                int j = (listeners.length - 1) - i;
                if (listeners[j] == null)
                    continue;
                if (listeners[j] instanceof ServletContextListener) {
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.