FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); object = tempContext; } else {
FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(currentFile.getPath()); tempContext.setAllowLinking(getAllowLinking()); object = tempContext; } else {
FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); object = tempContext; } else {
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name */ @Override protected Object doLookup(String name) { Object result = null; File file = file(name); if (file == null) return null; if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); result = tempContext; } else { result = new FileResource(file); } return result; }
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name */ @Override protected Object doLookup(String name) { Object result = null; File file = file(name); if (file == null) return null; if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); result = tempContext; } else { result = new FileResource(file); } return result; }
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name */ @Override protected Object doLookup(String name) { Object result = null; File file = file(name); if (file == null) return null; if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); result = tempContext; } else { result = new FileResource(file); } return result; }
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name */ @Override protected Object doLookup(String name) { Object result = null; File file = file(name); if (file == null) return null; if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); result = tempContext; } else { result = new FileResource(file); } return result; }
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name */ @Override protected Object doLookup(String name) { Object result = null; File file = file(name); if (file == null) return null; if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); result = tempContext; } else { result = new FileResource(file); } return result; }
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name * @exception NamingException if a naming exception is encountered */ public Object lookup(String name) throws NamingException { Object result = null; File file = file(name); if (file == null) throw new NamingException (sm.getString("resources.notFound", name)); if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); tempContext.setCaseSensitive(isCaseSensitive()); result = tempContext; } else { result = new FileResource(file); } return result; }
/** * Retrieves the named object. * * @param name the name of the object to look up * @return the object bound to name * @exception NamingException if a naming exception is encountered */ public Object lookup(String name) throws NamingException { Object result = null; File file = file(name); if (file == null) throw new NamingException (MESSAGES.resourceNotFound(name)); if (file.isDirectory()) { FileDirContext tempContext = new FileDirContext(env); tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); tempContext.setCaseSensitive(isCaseSensitive()); result = tempContext; } else { result = new FileResource(file); } return result; }
FileDirContext fileDirContext = (FileDirContext)resources; fileDirContext.setCaseSensitive(isCaseSensitive()); fileDirContext.setAllowLinking(isAllowLinking());
/** * Set the resources DirContext object with which this Container is * associated. * * @param resources The newly associated DirContext */ public synchronized void setResources(DirContext resources) { if (started) { throw new IllegalStateException (sm.getString("standardContext.resources.started")); } DirContext oldResources = this.webappResources; if (oldResources == resources) return; if (resources instanceof BaseDirContext) { ((BaseDirContext) resources).setCached(isCachingAllowed()); ((BaseDirContext) resources).setCacheTTL(getCacheTTL()); ((BaseDirContext) resources).setCacheMaxSize(getCacheMaxSize()); } if (resources instanceof FileDirContext) { filesystemBased = true; ((FileDirContext) resources).setCaseSensitive(isCaseSensitive()); ((FileDirContext) resources).setAllowLinking(isAllowLinking()); } this.webappResources = resources; // The proxied resources will be refreshed on start this.resources = null; support.firePropertyChange("resources", oldResources, this.webappResources); }
filesystemBased = true; ((FileDirContext) resources).setCaseSensitive(isCaseSensitive()); ((FileDirContext) resources).setAllowLinking(isAllowLinking());
private synchronized void setAlternateResources( AlternateDocBase alternateDocBase, DirContext resources) { if (started) { throw new IllegalStateException(rb.getString(LogFacade.RESOURCES_STARTED)); } final DirContext oldResources = ContextsAdapterUtility.unwrap( alternateDocBase.getWebappResources()); if (oldResources == resources) return; if (resources instanceof BaseDirContext) { ((BaseDirContext) resources).setCached(isCachingAllowed()); ((BaseDirContext) resources).setCacheTTL(getCacheTTL()); ((BaseDirContext) resources).setCacheMaxSize(getCacheMaxSize()); } if (resources instanceof FileDirContext) { filesystemBased = true; ((FileDirContext) resources).setCaseSensitive(isCaseSensitive()); ((FileDirContext) resources).setAllowLinking(isAllowLinking()); } alternateDocBase.setWebappResources(ContextsAdapterUtility.wrap(resources)); // The proxied resources will be refreshed on start alternateDocBase.setResources(null); }
((FileDirContext) resources).setAllowLinking(isAllowLinking());
/** * Set the resources DirContext object with which this Container is * associated. * * @param resources The newly associated DirContext */ public void setResources(DirContext resources) { if (started) { throw MESSAGES.cannotSetResourcesAfterStart(); } DirContext oldResources = this.webappResources; if (oldResources == resources) return; if (resources instanceof BaseDirContext) { ((BaseDirContext) resources).setCached(isCachingAllowed()); ((BaseDirContext) resources).setCacheTTL(getCacheTTL()); ((BaseDirContext) resources).setCacheMaxSize(getCacheMaxSize()); ((BaseDirContext) resources).setCacheObjectMaxSize(getCacheObjectMaxSize()); } if (resources instanceof FileDirContext) { filesystemBased = true; ((FileDirContext) resources).setCaseSensitive(isCaseSensitive()); ((FileDirContext) resources).setAllowLinking(isAllowLinking()); } this.webappResources = resources; // The proxied resources will be refreshed on start this.resources = null; support.firePropertyChange("resources", oldResources, this.webappResources); }
((FileDirContext) resources).setAllowLinking(isAllowLinking());
((FileDirContext) resources).setAllowLinking(isAllowLinking());
((FileDirContext) resources).setAllowLinking(isAllowLinking());
((FileDirContext) resources).setAllowLinking(isAllowLinking());