@Override public void createWebResourceSet(ResourceSetType type, String webAppMount, URL url, String internalPath) { BaseLocation baseLocation = new BaseLocation(url); createWebResourceSet(type, webAppMount, baseLocation.getBasePath(), baseLocation.getArchivePath(), internalPath); }
@Override public void createWebResourceSet(ResourceSetType type, String webAppMount, URL url, String internalPath) { BaseLocation baseLocation = new BaseLocation(url); createWebResourceSet(type, webAppMount, baseLocation.getBasePath(), baseLocation.getArchivePath(), internalPath); }
private void processWebInfLib() { WebResource[] possibleJars = listResources("/WEB-INF/lib", false); for (WebResource possibleJar : possibleJars) { if (possibleJar.isFile() && possibleJar.getName().endsWith(".jar")) { createWebResourceSet(ResourceSetType.CLASSES_JAR, "/WEB-INF/classes", possibleJar.getURL(), "/"); } } }
@Override public void createWebResourceSet(ResourceSetType type, String webAppMount, URL url, String internalPath) { BaseLocation baseLocation = new BaseLocation(url); createWebResourceSet(type, webAppMount, baseLocation.getBasePath(), baseLocation.getArchivePath(), internalPath); }
/** * Class loader resources are handled by treating JARs in WEB-INF/lib as * resource JARs (without the internal META-INF/resources/ prefix) mounted * at WEB-INF/classes (rather than the web app root). This enables reuse * of the resource handling plumbing. * * These resources are marked as class loader only so they are only used in * the methods that are explicitly defined to return class loader resources. * This prevents calls to getResource("/WEB-INF/classes") returning from one * or more of the JAR files. * * @throws LifecycleException If an error occurs that should stop the web * application from starting */ protected void processWebInfLib() throws LifecycleException { WebResource[] possibleJars = listResources("/WEB-INF/lib", false); for (WebResource possibleJar : possibleJars) { if (possibleJar.isFile() && possibleJar.getName().endsWith(".jar")) { createWebResourceSet(ResourceSetType.CLASSES_JAR, "/WEB-INF/classes", possibleJar.getURL(), "/"); } } }
/** * Class loader resources are handled by treating JARs in WEB-INF/lib as * resource JARs (without the internal META-INF/resources/ prefix) mounted * at WEB-INF/classes (rather than the web app root). This enables reuse * of the resource handling plumbing. * * These resources are marked as class loader only so they are only used in * the methods that are explicitly defined to return class loader resources. * This prevents calls to getResource("/WEB-INF/classes") returning from one * or more of the JAR files. * * @throws LifecycleException If an error occurs that should stop the web * application from starting */ protected void processWebInfLib() throws LifecycleException { WebResource[] possibleJars = listResources("/WEB-INF/lib", false); for (WebResource possibleJar : possibleJars) { if (possibleJar.isFile() && possibleJar.getName().endsWith(".jar")) { createWebResourceSet(ResourceSetType.CLASSES_JAR, "/WEB-INF/classes", possibleJar.getURL(), "/"); } } }
root.createWebResourceSet( WebResourceRoot.ResourceSetType.PRE, "/WEB-INF/classes",