Examples of ContextResource


Examples of org.apache.tomcat.deploy.ContextResource

     * none have been defined, a zero-length array is returned.
     */
    public ContextResource[] findResources() {

  synchronized (resources) {
      ContextResource results[] = new ContextResource[resources.size()];
      Enumeration elements = resources.elements();
      for (int i = 0; i < results.length; i++)
    results[i] = (ContextResource) elements.nextElement();
      return (results);
  }
View Full Code Here

Examples of org.apache.tomcat.util.descriptor.web.ContextResource

        } else if (type.equals("addResource")) {

            String resourceName = (String) event.getData();
            if (resourceName != null) {
                ContextResource resource =
                    namingResources.findResource(resourceName);
                addResource(resource);
            }

        } else if (type.equals("addResourceLink")) {
View Full Code Here

Examples of org.apache.tomcat.util.descriptor.web.ContextResource

                    addLocalEjb(ejb);
                }
            }
        } else if (name.equals("resource")) {
            if (oldValue != null) {
                ContextResource resource = (ContextResource) oldValue;
                if (resource.getName() != null) {
                    removeResource(resource.getName());
                }
            }
            if (newValue != null) {
                ContextResource resource = (ContextResource) newValue;
                if (resource.getName() != null) {
                    addResource(resource);
                }
            }
        } else if (name.equals("resourceEnvRef")) {
            if (oldValue != null) {
View Full Code Here

Examples of org.springframework.core.io.ContextResource

   *
   * @see org.osgi.framework.Bundle#getEntry(String)
   * @see org.osgi.framework.Bundle#getResource(String)
   */
  public URL getURL() throws IOException {
    ContextResource res = null;
    URL url = null;

    switch (searchType) {
      // same as bundle space but with a different string
      case OsgiResourceUtils.PREFIX_TYPE_NOT_SPECIFIED:
        res = getResourceFromBundleSpace(pathWithoutPrefix);
        break;
      case OsgiResourceUtils.PREFIX_TYPE_BUNDLE_SPACE:
        res = getResourceFromBundleSpace(pathWithoutPrefix);
        break;
      case OsgiResourceUtils.PREFIX_TYPE_BUNDLE_JAR:
        url = getResourceFromBundleJar(pathWithoutPrefix);
        break;
      case OsgiResourceUtils.PREFIX_TYPE_CLASS_SPACE:
        url = getResourceFromBundleClasspath(pathWithoutPrefix);
        break;
      // fallback
      default:
        // just try to convert it to an URL
        url = new URL(path);
        break;
    }

    if (res != null) {
      url = res.getURL();
    }

    if (url == null) {
      throw new FileNotFoundException(getDescription() + " cannot be resolved to URL because it does not exist");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.