if (f.exists() && f.canRead()) { if (f.isFile()) { return new FileResource(f); if (f.exists() && f.canRead()) { if (f.isFile()) { return new FileResource(f);
if (f.exists() && f.canRead()) { if (f.isFile()) { return new FileResource(f); if (f.exists() && f.canRead()) { if (f.isFile()) { return new FileResource(f);
object = tempContext; } else { object = new FileResource(currentFile);
object = tempContext; } else { object = new FileResource(currentFile);
object = tempContext; } else { object = new FileResource(currentFile);
object = tempContext; } else { object = new FileResource(currentFile);
object = tempContext; } else { object = new FileResource(currentFile);
object = tempContext; } else { object = new FileResource(currentFile);
object = tempContext; } else { object = new FileResource(currentFile);
/** * 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; }
/** * 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 */ @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; }
@Override protected Object doLookup(String name) { // handle "virtual" tlds if (name.startsWith("/WEB-INF/") && name.endsWith(".tld")) { String tldName = name.substring(name.lastIndexOf("/") + 1); if (virtualMappings.containsKey(tldName)) { return new FileResource(virtualMappings.get(tldName)); } } else if (name.startsWith("/META-INF/tags") && name.endsWith(".tag") || name.endsWith(".tagx")) { // already loaded tag file: we are sure that getAttributes() has // already been called if we are here File tagFile = tagfileMappings.get(name); if (tagFile != null) { return new FileResource(tagFile); } } return super.doLookup(name); }
@Override public Object lookup(String name) throws NamingException { // handle "virtual" tlds if (name.startsWith("/WEB-INF/") && name.endsWith(".tld")) { String tldName = name.substring(name.lastIndexOf("/") + 1); if (virtualMappings.containsKey(tldName)) { return new FileResource(virtualMappings.get(tldName)); } } else if (name.startsWith("/META-INF/tags") && name.endsWith(".tag") || name.endsWith(".tagx")) { // already loaded tag file: we are sure that getAttributes() has // already been called if we are here File tagFile = tagfileMappings.get(name); if (tagFile != null) { return new FileResource(tagFile); } } return super.lookup(name); }
@Override protected Object doLookup(String name) { // handle "virtual" tlds if (name.startsWith("/WEB-INF/") && name.endsWith(".tld")) { String tldName = name.substring(name.lastIndexOf("/") + 1); if (virtualMappings.containsKey(tldName)) { return new FileResource(virtualMappings.get(tldName)); } } else if (name.startsWith("/META-INF/tags") && name.endsWith(".tag") || name.endsWith(".tagx")) { // already loaded tag file: we are sure that getAttributes() has // already been called if we are here File tagFile = tagfileMappings.get(name); if (tagFile != null) { return new FileResource(tagFile); } } return super.doLookup(name); }
@Override protected Object doLookup(String name) { // handle "virtual" tlds if (name.startsWith("/WEB-INF/") && name.endsWith(".tld")) { String tldName = name.substring(name.lastIndexOf("/") + 1); if (virtualMappings.containsKey(tldName)) { return new FileResource(virtualMappings.get(tldName)); } } else if (name.startsWith("/META-INF/tags") && name.endsWith(".tag") || name.endsWith(".tagx")) { // already loaded tag file: we are sure that getAttributes() has // already been called if we are here File tagFile = tagfileMappings.get(name); if (tagFile != null) { return new FileResource(tagFile); } } return super.doLookup(name); }