Package org.eclipse.jetty.util.resource

Examples of org.eclipse.jetty.util.resource.ResourceCollection


    {
        File baseDirectory = new File(System.getProperty("basedir", "."));
        File overlaidScriptDirectory = new File(baseDirectory, "target/scripts");
        File mainResourcesDirectory = new File(baseDirectory, "src/main/resources");
        File testResourcesDirectory = new File(baseDirectory, "src/test/resources");
        context.setBaseResource(new ResourceCollection(new String[]
                {
                        overlaidScriptDirectory.getCanonicalPath(),
                        mainResourcesDirectory.getCanonicalPath(),
                        testResourcesDirectory.getCanonicalPath()
                }));
View Full Code Here


            Resource[] collection=new Resource[resources.size()+1];
            int i=0;
            collection[i++]=context.getBaseResource();
            for (Resource resource : resources)
                collection[i++]=resource;
            context.setBaseResource(new ResourceCollection(collection));
        }
    }
View Full Code Here

                web_inf_classes.copyTo(webInfClassesDir);
            }

            web_inf=Resource.newResource(extractedWebInfDir.getCanonicalPath());

            ResourceCollection rc = new ResourceCollection(web_inf,web_app);

            if (LOG.isDebugEnabled())
                LOG.debug("context.resourcebase = "+rc);

            context.setBaseResource(rc);
View Full Code Here

            String[] rs = rl.split(" *, *");
            for (String r:rs)
                resources.add(r);
        }
       
        setBaseResource(new ResourceCollection(resources.toArray(new String[resources.size()])));
    }
View Full Code Here

        // - the base directories
        str = (String)props.getProperty("base.dirs");
        if (str != null && !"".equals(str.trim()))
        {
            webApp.setWar(str);
            webApp.setBaseResource(new ResourceCollection(str.split(File.pathSeparator)));
        }
       
        // - put virtual webapp base resource first on resource path or not
        str = (String)props.getProperty("base.first");
        if (str != null && !"".equals(str.trim()))
View Full Code Here

    final ServletContextHandler servletContext = new ServletContextHandler(server, contextPath, true, true);
    final List<Connector> connectors = new LinkedList<>();

    // create resource collection from base path & source JAR
    try {
      servletContext.setBaseResource(new ResourceCollection(Resource.newResource(basePath), JarResource.newJarResource(Resource.newResource(sourceJarName))));

    } catch (Throwable t) {

      logger.log(Level.WARNING, "Base resource {0} not usable: {1}", new Object[]{basePath, t.getMessage()});
    }
View Full Code Here

      // and: http://jira.codehaus.org/browse/JETTY-467?focusedCommentId=114884&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-114884
      jettySessionManager.setSessionIdPathParameterName(null);

      context.getSessionHandler().setSessionManager(jettySessionManager);
    }
    final ResourceCollection resources = new ResourceCollection(resourceBases);
    context.setBaseResource(resources);

    addWebSocketServlets();

    try {
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.util.resource.ResourceCollection

Copyright © 2018 www.massapicom. 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.