Package org.eclipse.jetty.webapp

Examples of org.eclipse.jetty.webapp.WebAppContext.start()


            // set the thread context classloader to the parent classloader
            ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(parentClassLoader);
            // start context
            try {
                webAppContext.start();
            } catch (Exception e) {
                throw new DeployerException("Cannot start the context '" + war.getContextRoot() + "'", e);
            } finally {
                // reset classloader
                Thread.currentThread().setContextClassLoader(oldCl);
View Full Code Here


                    @Override
                    public void filesChanged(List<String> filenames)
                            throws Exception {
                        webappcontext.stop();
                        server.stop();
                        webappcontext.start();
                        server.start();
                    }
                });
                scanner.setReportExistingFilesOnStartup(false);
                scanner.setFilenameFilter(new FilenameFilter() {
View Full Code Here

                server.getContainer().addBean(scanner);
            }
        }

        // Read web.xml to find all configured servlets
        webappcontext.start();

        // Reconfigure all servlets to avoid startup delay
        for (ServletHolder servletHolder : webappcontext.getServletHandler()
                .getServlets()) {
            if (servletHolder
View Full Code Here

    WebAppClassLoader classLoader = new WebAppClassLoader(context);
    classLoader.addClassPath("target/classes");
    classLoader.addClassPath("target/test-classes");
    context.setClassLoader(classLoader);

    context.start();

    System.out.println("[INFO] Application reloaded");
  }
}
View Full Code Here

          * as a ContainerConfiguration from WebAppClassContext. ClassCastException.
          */
         wctx.setParentLoaderPriority(true);

         ((HandlerCollection) server.getHandler()).addHandler(wctx);
         wctx.start();
         webAppContextProducer.set(wctx);
        
         HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
         for(ServletHolder servlet : wctx.getServletHandler().getServlets())
         {
View Full Code Here

          * as a ContainerConfiguration from WebAppClassContext. ClassCastException.
          */
         wctx.setParentLoaderPriority(true);

         ((HandlerCollection) server.getHandler()).addHandler(wctx);
         wctx.start();
         webAppContextProducer.set(wctx);

         HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
         for(ServletHolder servlet : wctx.getServletHandler().getServlets())
         {
View Full Code Here

    // internalUndeploy( topology ); KNOX-152
    context.setAttribute( GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE, name );
    deployments.put( name, context );
    contexts.addHandler( context );
    try {
      context.start();
    } catch( Exception e ) {
      log.failedToDeployTopology( name, e );
    }
  }
View Full Code Here

    context.setWar( warPath );
    internalUndeploy( topology );
    deployments.put( name, context );
    contexts.addHandler( context );
    try {
      context.start();
    } catch( Exception e ) {
      log.failedToDeployTopology( name, e );
    }
  }
View Full Code Here

          * as a ContainerConfiguration from WebAppClassContext. ClassCastException.
          */
         wctx.setParentLoaderPriority(true);

         ((HandlerCollection) server.getHandler()).addHandler(wctx);
         wctx.start();
         webAppContextProducer.set(wctx);
        
         HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
         for(ServletHolder servlet : wctx.getServletHandler().getServlets())
         {
View Full Code Here

  {
    app.root().logger(ApplicationServer.class).debug(DEPLOYING_APP_MSG, app.getName());
    WebAppContext appContext = ApplicationServerUtils.createContextForApp(app);

    contexts.addHandler(appContext);
    appContext.start();
    ApplicationServerUtils.getDeployFileForApp(app).delete();

    return appContext;
  }
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.