/** * <p class="changed_added_4_0"> * </p> * * @param path * @param resource * @see org.jboss.test.faces.staging.StagingServer#addResource(java.lang.String, java.lang.String) */ public FacesEnvironment withResource(String path, String resource) { this.facesServer.addResource(path, resource); return this; }
contextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); facesServer.addResource(WEB_XML, webXmlDefault); if (null != webRoot) { facesServer.addResourcesFromDirectory("/", webRoot);
/** * <p class="changed_added_4_0"> * </p> * * @param path * @param resource * @see org.jboss.test.faces.staging.StagingServer#addResource(java.lang.String, java.lang.String) */ public FacesEnvironment withResource(String path, String resource) { this.facesServer.addResource(path, resource); return this; }
contextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); facesServer.addResource(WEB_XML, webXmlDefault); if (null != webRoot) { facesServer.addResourcesFromDirectory("/", webRoot);
public FacesEnvironment withResource(String path, URL resource) { this.facesServer.addResource(path, resource); return this; }
public FacesEnvironment withResource(String path, URL resource) { this.facesServer.addResource(path, resource); return this; }
/** * Internal reccursive method process directory content and all subdirectories. * * @param baseDirectory * @param file * @throws MalformedURLException */ protected void addFiles(String resourcePath, File file) throws MalformedURLException { File[] files = file.listFiles(); for (File subfile : files) { if (!subfile.isDirectory()) { addResource(resourcePath + "/" + subfile.getName(), subfile.toURI().toURL()); } else { String directoryPath = resourcePath + "/" + subfile.getName(); addDirectory(directoryPath); addFiles(directoryPath, subfile); } } }
/** * Internal reccursive method process directory content and all subdirectories. * * @param baseDirectory * @param file * @throws MalformedURLException */ protected void addFiles(String resourcePath, File file) throws MalformedURLException { File[] files = file.listFiles(); for (File subfile : files) { if (!subfile.isDirectory()) { addResource(resourcePath + "/" + subfile.getName(), subfile.toURI().toURL()); } else { String directoryPath = resourcePath + "/" + subfile.getName(); addDirectory(directoryPath); addFiles(directoryPath, subfile); } } }
String relativePath = zzz.getName().substring(entry.length()); URL relativeResource = new URL(resource, relativePath); addResource(resourcePath + "/" + relativePath, relativeResource);
String relativePath = zzz.getName().substring(entry.length()); URL relativeResource = new URL(resource, relativePath); addResource(resourcePath + "/" + relativePath, relativeResource);