Examples of ServletContextResource


Examples of org.springframework.web.context.support.ServletContextResource

  private ServletContext servletContext;

  @Override
  protected Resource getResourceForPath(String prefix, String location, ClassLoader classLoader) {
    return new ServletContextResource(this.servletContext, prefix + location);
  }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

    public final void testGetResourceForPath() {       
        replay(servletContext);
        Resource resource = resourceLoader.getResource("/mypath", null);
        assertTrue(resource instanceof ServletContextResource);
        ServletContextResource r = (ServletContextResource)resource;
        assertSame(servletContext, r.getServletContext());
        verify(servletContext);
    }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

  public void afterPropertiesSet() throws Exception {
    Assert.notNull(relativeModuleRootLocation);
  }

  public Resource getRootDirectory() {
    return new ServletContextResource(servletContext, relativeModuleRootLocation);
  }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

  }
 
  public List<Resource> getApplicationModuleClassLocations(String moduleName) {
    String applicationVersionString = StringUtils.hasText(applicationVersion) ? "-" + applicationVersion : "";
    String fullResourceName = relativeModuleRootLocation + "/" + moduleName + applicationVersionString + ".jar";
    Resource servletContextResource = new ServletContextResource(servletContext, fullResourceName);
    return Collections.singletonList(servletContextResource);
  }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

        Resource[] resources = new Resource[locations.size()];
   
        for (int i = 0; i < locations.size(); i++) {
            // note that this is relying on the contextClassLoader to be set up
            // correctly
            resources[i] = new ServletContextResource(servletContext, locations.get(i));
        }
        return resources;
    }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

    private ServletContext servletContext;

    @Override
    protected Resource getResourceForPath(String prefix, String location, ClassLoader classLoader) {
        return new ServletContextResource(this.servletContext, prefix + location);
    }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

    public void afterPropertiesSet() throws Exception {
        Assert.notNull(relativeModuleRootLocation);
    }

    public Resource getRootDirectory() {
        return new ServletContextResource(servletContext, relativeModuleRootLocation);
    }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

    }
   
    public List<Resource> getApplicationModuleClassLocations(String moduleName) {
        String applicationVersionString = StringUtils.hasText(applicationVersion) ? "-" + applicationVersion : "";
        String fullResourceName = relativeModuleRootLocation + "/" + moduleName + applicationVersionString + ".jar";
        Resource servletContextResource = new ServletContextResource(servletContext, fullResourceName);
        return Collections.singletonList(servletContextResource);
    }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

    public void afterPropertiesSet() throws Exception {
        Assert.notNull(relativeModuleRootLocation);
    }

    public Resource getRootDirectory() {
        return new ServletContextResource(servletContext, relativeModuleRootLocation);
    }
View Full Code Here

Examples of org.springframework.web.context.support.ServletContextResource

     */
    public List<Resource> getApplicationModuleClassLocations(String moduleName) {
        String applicationVersionString = StringUtils.hasText(applicationVersion) ? "-" + applicationVersion : "";
        String folderResourceName = relativeModuleRootLocation + "/" + moduleName;
    String fullJarResourceName = folderResourceName + applicationVersionString + ".jar";
        Resource folderResource = new ServletContextResource(servletContext, folderResourceName);
        Resource jarResource = new ServletContextResource(servletContext, fullJarResourceName);
        return Arrays.asList(folderResource,
            jarResource);
    }
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.