/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(name); }
/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(name); }
/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(name); }
/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(name); }
/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(name); }
/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(name); }
/** * Retrieves the named object, following links except for the terminal * atomic component of the name. If the object bound to name is not a * link, returns the object itself. * * @param name the name of the object to look up * @return the object bound to name, not following the terminal link * (if any). * @exception NamingException if a naming exception is encountered */ @Override public Object lookupLink(String name) throws NamingException { // Note : Links are not supported return lookup(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 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); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception javax.naming.directory.InvalidAttributesException if attrs * does not contain all the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (sm.getString("resources.alreadyBound", name)); if (!file.mkdir()) throw new NamingException (sm.getString("resources.bindFailed", name)); return (DirContext) lookup(name); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception InvalidAttributesException if attrs does not contain all * the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (MESSAGES.resourceAlreadyBound(name)); if (!file.mkdir()) throw new NamingException (MESSAGES.resourceBindFailed(name)); return (DirContext) lookup(name); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception javax.naming.directory.InvalidAttributesException if attrs * does not contain all the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (sm.getString("resources.alreadyBound", name)); if (!file.mkdir()) throw new NamingException (sm.getString("resources.bindFailed", name)); return (DirContext) lookup(name); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception javax.naming.directory.InvalidAttributesException if attrs * does not contain all the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (sm.getString("resources.alreadyBound", name)); if (!file.mkdir()) throw new NamingException (sm.getString("resources.bindFailed", name)); return (DirContext) lookup(name); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception javax.naming.directory.InvalidAttributesException if attrs * does not contain all the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (sm.getString("resources.alreadyBound", name)); if (!file.mkdir()) throw new NamingException (sm.getString("resources.bindFailed", name)); return (DirContext) lookup(name); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception InvalidAttributesException if attrs does not contain all * the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (sm.getString("resources.alreadyBound", name)); if (!file.mkdir()) throw new NamingException (sm.getString("resources.bindFailed", name)); return (DirContext) lookup(name); }
/** * Creates and binds a new context, along with associated attributes. * This method creates a new subcontext with the given name, binds it in * the target context (that named by all but terminal atomic component of * the name), and associates the supplied attributes with the newly * created object. All intermediate and target contexts must already * exist. If attrs is null, this method is equivalent to * Context.createSubcontext(). * * @param name the name of the context to create; may not be empty * @param attrs the attributes to associate with the newly created context * @return the newly created context * @exception NameAlreadyBoundException if the name is already bound * @exception javax.naming.directory.InvalidAttributesException if attrs * does not contain all the mandatory attributes required for creation * @exception NamingException if a naming exception is encountered */ @Override public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { File file = new File(base, name); if (file.exists()) throw new NameAlreadyBoundException (sm.getString("resources.alreadyBound", name)); if (!file.mkdir()) throw new NamingException (sm.getString("resources.bindFailed", name)); return (DirContext) lookup(name); }
fileDirContext.setDocBase(new File(url.toURI()).getAbsolutePath()); try { fileDirContext.lookup("META-INF/resources/");
fileDirContext.setDocBase(new File(url.toURI()).getAbsolutePath()); try { fileDirContext.lookup("META-INF/resources/");