Java 类org.apache.catalina.WebResourceRoot.ResourceSetType 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TomcatResources.java   
private void addResourceSet(String resource) {
    try {
        if (isInsideNestedJar(resource)) {
            // It's a nested jar but we now don't want the suffix because Tomcat
            // is going to try and locate it as a root URL (not the resource
            // inside it)
            resource = resource.substring(0, resource.length() - 2);
        }
        URL url = new URL(resource);
        String path = "/META-INF/resources";
        getContext().getResources().createWebResourceSet(
                ResourceSetType.RESOURCE_JAR, "/", url, path);
    }
    catch (Exception ex) {
        // Ignore (probably not a directory)
    }
}
项目:spring-boot-concourse    文件:TomcatResources.java   
private void addResourceSet(String resource) {
    try {
        if (isInsideNestedJar(resource)) {
            // It's a nested jar but we now don't want the suffix because Tomcat
            // is going to try and locate it as a root URL (not the resource
            // inside it)
            resource = resource.substring(0, resource.length() - 2);
        }
        URL url = new URL(resource);
        String path = "/META-INF/resources";
        getContext().getResources().createWebResourceSet(
                ResourceSetType.RESOURCE_JAR, "/", url, path);
    }
    catch (Exception ex) {
        // Ignore (probably not a directory)
    }
}
项目:contestparser    文件:TomcatResources.java   
private void addResourceSet(String resource) {
    try {
        if (isInsideNestedJar(resource)) {
            // It's a nested jar but we now don't want the suffix because Tomcat
            // is going to try and locate it as a root URL (not the resource
            // inside it)
            resource = resource.substring(0, resource.length() - 2);
        }
        URL url = new URL(resource);
        String path = "/META-INF/resources";
        getContext().getResources().createWebResourceSet(
                ResourceSetType.RESOURCE_JAR, "/", url, path);
    }
    catch (Exception ex) {
        // Ignore (probably not a directory)
    }
}