Gets external resource for an HTML page in the setup-resources folder.

@param context the context
@param name the file name

@return the resource for the HTML page
14143
public static Resource getSetupPage(I_SetupUiContext context, String name) {

        String path = CmsStringUtil.joinPaths(context.getSetupBean().getContextPath(), CmsSetupBean.FOLDER_SETUP, name);
        Resource resource = new ExternalResource(path);
        return resource;
    }
133421
public static Cookie getCookie(final WebContext context, final String name) {
        return getCookie(context.getRequestCookies(), name);
    }
855599
public URL getResource(final String name) {
		final String normalizedName = Path.normalizeResourcePath(rootPath
				+ (name.startsWith("/") ? "" : "/") + name).trim();

		log.debug("Searching bundle " + bundle
						+ " for resource [{}], normalized to [{}]", name,
				normalizedName);

		URL url = resourceCache.get(normalizedName);

		if (url == null && !normalizedName.isEmpty()) {
			url = bundle.getEntry(normalizedName);
			if (url == null) {
				log.debug("getEntry failed, trying with /META-INF/resources/ in bundle class space");
				// Search attached bundles for web-fragments
				Set<Bundle> bundlesInClassSpace = ClassPathUtil.getBundlesInClassSpace(bundle, new HashSet<>());
				for (Bundle bundleInClassSpace : bundlesInClassSpace) {
					url = bundleInClassSpace.getEntry("/META-INF/resources/" + normalizedName);
					if (url != null) {
						break;
					}
				}
			}
			// obviously still not found might be available from a attached bundle resource
			if (url == null) {
				log.debug("getEntry failed, fallback to getResource");
				url = bundle.getResource(normalizedName);
			}
			if (url == null) {
				url = NO_URL;
			}
			resourceCache.putIfAbsent(normalizedName, url);
		}

		if (url != null && url != NO_URL) {
			log.debug("Resource found as url [{}]", url);
		} else {
			log.debug("Resource not found");
			url = null;
		}
		return url;
	}
1103112
public static URL getResource(String name) {
        if (false)
            return unchecked(() -> new URL("file:///your/path/here/src/main/wallettemplate/" + name));
        else
            return MainController.class.getResource(name);
    }
932601
function( name )
	{
		var external = this.externals[ name ];
		return CKEDITOR.getUrl(
				this.getPath( name ) +
				( ( external && ( typeof external.file == 'string' ) ) ? external.file : this.fileName + '.js' ) );
	}
352459
public Object get(String name){
        return RequestContext.getHttpRequest().getSession(true).getAttribute(name);
    }
1008112
public Document findXMLResource(String name) {
    URL url = this.getClass().getResource(name);
    DocumentBuilderFactory docFactory = DocumentBuilderFactory
            .newInstance();
    docFactory.setNamespaceAware(true);
	// Fortify Mod: Disable entity expansion to foil External Entity Injections
	docFactory.setExpandEntityReferences(false);
    Document doc = null;
    try {
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
      doc = docBuilder.parse(url.toURI().toString());
    } catch (Exception e) {
      LOGR.log(Level.WARNING, "Failed to parse classpath resource "
              + name, e);
    }
    return doc;
  }
959613
public URL getResourceURL(String name) {
		if (name.length() == 0) return null;
		if (name.charAt(0) == '/') name = name.substring(1);
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		URL url = cl.loadResourceURL(name);
    		if (url != null) return url;
    	}
    	// then try on the core one
    	return AppClassLoader.class.getClassLoader().getResource(name);
	}
1103247
protected final SourceFolder getOrCreateSourceFolder(String name) {
		SourceFolder sourceFolder = this.sourceFolders.get(name);
		if (sourceFolder == null) {
			sourceFolder = new SourceFolder(name);
			this.sourceFolders.put(name, sourceFolder);
		}
		return sourceFolder;
	}
1163380
public static function getResource(string $name)
    {
        $resource = static::getInstance($name)->getResource();

        if(RequestContext::exsits() && $resource)
        {
            static::pushResourceToRequestContext($resource);
        }

        return $resource;
    }
333964
@Override
    protected URL getURL(String name) {
        return Thread.currentThread().getContextClassLoader().getResource(name);
    }
613286
public URL getResource(String name)
    {
        URL url= null;
        boolean tried_parent= false;
        if (_parent!=null &&(_java2compliant || isSystemPath(name)))
        {
            if (log.isTraceEnabled())
                log.trace("try getResource " + name + " from " + _parent);
            tried_parent= true;
            url= _parent.getResource(name);
        }

        if (url == null)
        {
            if (log.isTraceEnabled())
                log.trace("try findResource " + name + " from " + _urlClassPath);
            url= this.findResource(name);

            if (url == null && name.startsWith("/"))
            {
                if (log.isDebugEnabled())
                    log.debug("HACK leading / off " + name);
                url= this.findResource(name.substring(1));
            }
        }

        if (_parent!=null && url == null && !tried_parent)
        {
            if (log.isTraceEnabled())
                log.trace("try getResource " + name + " from " + _parent);
            url= _parent.getResource(name);
        }

        if (url != null)
            if (log.isTraceEnabled())
                log.trace("found " + url);

        return url;
    }
675107
@Override
    public URL getResource(String name) {
        return name == null ? null : shadowedLoader.getResource(name);
    }
121178
@NonNull
  public static File getFile(@NonNull Context context, @NonNull String fileName) {
    return new File(context.getFilesDir(), fileName);
  }
391929
public static Object getLocalVar(ExecutionContext context, String name) {
        LexicalEnvironment localEnv = context.getLexicalEnvironment();
        if (localEnv.getRecord().hasBinding(context, name)) {
            return localEnv.getRecord().getBindingValue(context, name, false);
        }
        return null;
    }
745981
public static ORule.ResourceGeneric getResourceGeneric(String name)
	{
		String shortName = Strings.beforeFirst(name, '.');
		if(Strings.isEmpty(shortName)) shortName = name;
		ORule.ResourceGeneric value = ORule.ResourceGeneric.valueOf(shortName);
		if(value==null) value = ORule.mapLegacyResourceToGenericResource(name);
		return value;
	}
69742
protected InputStream getTemplateAsStream(TestContext context) {
        Resource resource;
        if (templateResource != null) {
            resource = templateResource;
        } else {
            resource = FileUtils.getFileResource(template, context);
        }

        String templateYml;
        try {
            templateYml = context.replaceDynamicContentInString(FileUtils.readToString(resource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read template resource", e);
        }
        return new ByteArrayInputStream(templateYml.getBytes());
    }