tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); tempContext.setCaseSensitive(isCaseSensitive()); object = tempContext; } else {
tempContext.setDocBase(file.getPath()); tempContext.setAllowLinking(getAllowLinking()); tempContext.setCaseSensitive(isCaseSensitive()); object = tempContext; } else {
/** * 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; }