Package org.eclipse.jetty.util.resource

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


  public static void main(String[] args) throws MalformedURLException, IOException, URISyntaxException {

    VirtualResource vr = new VirtualResource(
        Resource.newResource("C:/test2/"),
        "/mytest", "C:/test/");
    Resource r = vr.addPath("/mytest/test.txt");
    System.out.println(r.exists());

  }
View Full Code Here



    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here

          scanList.add(f);
        }
      }
    }
    if(config.getScanWEBINF()){
      Resource r;
      try {
        r = web.getResource("/WEB-INF");
        if(r.exists()){
          if(r.getFile().isDirectory()){
            scanList.add(r.getFile());
            System.err.println("Add WEB-INF to scanning list:"+r.getFile().getAbsolutePath());
          }
        }
      } catch (MalformedURLException e) {
      } catch (IOException e) {
      }
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here


    List<Resource> resources = new ArrayList<Resource>();

    URL urlWebapp = new File(configs.getWebAppDir()).toURI().toURL();
    Resource webapp = new FileResource(urlWebapp);
    resources.add(webapp);

    Map<String,String> map = configs.getResourceMap();
    for(String key : map.keySet()){
      resources.add(new VirtualResource(webapp,"/"+key,map.get(key)));
View Full Code Here

TOP

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

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.