Examples of WebAppContext


Examples of org.gatein.wci.spi.WebAppContext

   {
      servletContainerContext = context;
     
      for (String contextPath : pendingContexts.keySet())
      {
         WebAppContext webAppContext = pendingContexts.get(contextPath);
         String dispatcherPath = requestDispatchMap.get(webAppContext.getServletContext());
         servletContainerContext.registerWebApp(webAppContext, dispatcherPath);
      }
   }
View Full Code Here

Examples of org.glassfish.grizzly.servlet.WebappContext

        if (path.length() > 1) {
            if (path.endsWith("/"))
                path = path.substring(0, path.length() - 1);
        }

        WebappContext context = new WebappContext("GrizzlyContext", path);
        ServletRegistration registration = context.addServlet(c.getName(), c);
        registration.addMapping("");
        if (initParams == null) {
            registration.setInitParameter(ClasspathResourceConfig.PROPERTY_CLASSPATH,
                    System.getProperty("java.class.path").replace(File.pathSeparatorChar, ';'));
        } else {
            registration.setInitParameters(initParams);
        }

        HttpServer server = GrizzlyServerFactory.createHttpServer(u);
        context.deploy(server);
        return server;
    }
View Full Code Here

Examples of org.jahia.data.applications.WebAppContext

        }

        if (appBean != null && appBean.getContext() == null) {
            return null;
        }
        WebAppContext appContext = mRegistry.get (appBean.getContext());
        if (appContext == null) {
            synchronized (mRegistry) {
                if (appContext == null) {
                    // try to load from disk
                    appContext = loadContextInfoFromDisk (appBean.getID(), appBean.getContext());
                    if (appContext == null) {
                        // create a fake Application Context to avoid loading from disk the next time.
                        appContext = new WebAppContext(appBean.getContext());
                    }
                    mRegistry.put (appBean.getContext(), appContext);
                }
            }
        }
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

    });
   
    HandlerCollection handlers = new HandlerCollection();
    ContextHandlerCollection contexts = new ContextHandlerCollection();

    WebAppContext webAppContext1 = new WebAppContext("samples/actiontest/dist/actiontest", "/actiontest");
    WebAppContext webAppContext2 = new WebAppContext("samples/holiday-booking/dist/holidaybooking",
        "/holidaybooking");
    contexts.addHandler(webAppContext1);
    contexts.addHandler(webAppContext2);
   
    /*
 
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

      connector.setPort(DcSettings.getInt(DcRepository.Settings.stWebServerPort));
      server.setConnectors(new Connector[]{connector});
     
      String baseDir = DataCrow.installationDir + "webapp";
     
      WebAppContext webapp = new WebAppContext();
      webapp.setContextPath(context);
      webapp.setWar(baseDir + context);
      webapp.setDefaultsDescriptor(baseDir + context + "/WEB-INF/webdefault.xml");
     
      server.setHandler(webapp);
     
      server.start();
      isRunning = true;
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

    connector.setMaxIdleTime(1000 * 60 * 60);
    connector.setSoLingerTime(-1);
    connector.setPort(8080);
    server.setConnectors(new Connector[] { connector });

    WebAppContext bb = new WebAppContext();
    bb.setServer(server);
    bb.setContextPath("/");
    bb.setWar("src/main/webapp");
   
    // START JMX SERVER
    // MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
    // MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
    // server.getContainer().addEventListener(mBeanContainer);
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

            securityHandler.init(policyContextID, defaultPrincipal, checkedPermissions, excludedPermissions, classLoader);
        }

        ServletHandler servletHandler = new ServletHandler();

        webAppContext = new WebAppContext(securityHandler, sessionHandler, servletHandler, null);
        AbstractHandler next = sessionHandler;
        next = new ThreadClassloaderHandler(next, classLoader);

        GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
        Context enc = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, userTransaction, kernel, classLoader);
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

        securityRealm = new HashUserRealm( "Test Server" );

        securityHandler.setUserRealm( securityRealm );
        securityHandler.setConstraintMappings( new ConstraintMapping[]{ cm } );

        webappContext = new WebAppContext();
        webappContext.setContextPath( "/" );

        File base = getResource( SERVER_ROOT_RESOURCE_PATH );
        logger.info( "docroot: " + base );
        webappContext.setWar( base.getAbsolutePath() );
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

    private static WebAppContext buildContext() throws IOException {
        ProtectionDomain protectionDomain = Startup.class.getProtectionDomain();
        URL location = protectionDomain.getCodeSource().getLocation();

        WebAppContext context = new WebAppContext();
        WebAppClassLoader webAppClassLoader = new WebAppClassLoader(Startup.class.getClassLoader(),context);
        context.setClassLoader(webAppClassLoader);
        context.setContextPath(URIUtil.SLASH);
        context.setWar(location.toExternalForm());

        if( tempDir != null ) {
            File tempDirectory = new File(tempDir);
            context.setTempDirectory(tempDirectory);
        }
        return context;
    }
View Full Code Here

Examples of org.mortbay.jetty.webapp.WebAppContext

    }

    public static void main(String[] args) throws Exception {
        setThreadClassLoader();
        processOptions();
        WebAppContext context = buildContext();

        Server server = new Server();
        if( usingSSL ) {
            server.setConnectors(new Connector[]{buildConnector(),buildSslConnector()});
        }
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.