Creates a new FacesServletMapping object using prefix mapping.

@param path The path ("/faces", for example) which has been specified
in the url-pattern of the FacesServlet mapping.
@return a newly created FacesServletMapping
967791
public static FacesServletMapping createPrefixMapping(String path)
    {
        FacesServletMapping mapping = new FacesServletMapping();
        mapping.setPrefix(path);
        return mapping;
    }
427654
public VarSetBuilder varSetAtPath( String[] path)
    {
    VarSet varSet = null;
    if( path != null && path.length > 0)
      {
      varSet = new VarSet( path[0]);
      varSet_.addMember( varSet);

      for( int i = 1; i < path.length; i++)
        {
        VarSet child = new VarSet( path[i]);
        varSet.addMember( child);
        varSet = child;
        }
      }

    return
      varSet == null
      ? null
      : new VarSetBuilder( varSet);
    }
675816
public ThreadContextClassLoaderBuilder addPath(final String path) {

        // Check sanity
        Validate.notEmpty(path, "path");

        // Convert to an URL, and delegate.
        final URL anUrl;
        try {
            anUrl = new File(path).toURI().toURL();
        } catch (MalformedURLException e) {
            throw new IllegalArgumentException("Could not convert path [" + path + "] to an URL.", e);
        }

        // Delegate
        return addURL(anUrl);
    }
1358833
public Javalin patch(@NotNull String path, @NotNull Handler handler) {
        return addHandler(HandlerType.PATCH, path, handler);
    }
1257412
public Routed<T> route(String path) {
    Routed<T> ret = first.route(path);
    if (ret != null) return ret;

    ret = other.route(path);
    if (ret != null) return ret;

    ret = last.route(path);
    if (ret != null) return ret;

    if (notFound != null) return new Routed<T>(notFound, true, Collections.<String, String>emptyMap());

    return null;
  }
396052
public static URL[] getURLs(final String path) {
		final File topDir = new File(path);
		final List list = new ArrayList();
		CClassLoader.getClasses(topDir, list);

		final URL ret[] = new URL[list.size() + 1];

		for (int i = 0; i < list.size(); i++) {
			ret[i] = (URL) list.get(i);
		}

		try {
			ret[list.size()] = topDir.toURI().toURL();
		} catch (final Exception ignore) {
		}

		return ret;
	}
169952
public Resource addPath(String path)
        throws IOException,MalformedURLException
    {
        FileResource r=null;

        if (!isDirectory())
        {
            r=(FileResource)super.addPath(path);
        }
        else
        {
            path = org.browsermob.proxy.jetty.util.URI.canonicalPath(path);
            
            // treat all paths being added as relative
            String rel=path;
            if (path.startsWith("/"))
                rel = path.substring(1);
            
            File newFile = new File(_file,rel.replace('/', File.separatorChar));
            r=new FileResource(newFile.toURI().toURL(),null,newFile);
        }
        
        String encoded= org.browsermob.proxy.jetty.util.URI.encodePath(path);
        int expected=r._urlString.length()-encoded.length();
        int index = r._urlString.lastIndexOf(encoded, expected);
        
        if (expected!=index && ((expected-1)!=index || path.endsWith("/") || !r.isDirectory()))
        {
            r._alias=r._url;
            r._aliasChecked=true;
        }                   
        return r;
    }
1285585
protected HttpGet generateGetRequest(final String path, final Map<String, Object> paramMap) {
        final List<NameValuePair> pairs = new ArrayList<NameValuePair>();
        for (final String key : paramMap.keySet()) {
            pairs.add(new BasicNameValuePair(key, paramMap.get(key).toString()));
        }
        final URI uri = buildUri(path, pairs);
        return new HttpGet(uri);
    }
503529
public static String mappedUrl(SlingHttpServletRequest request, String path) {
        return LinkUtil.getMappedUrl(request, path);
    }
443565
private Map<String, String> authResForPath(Path path) {
        HashMap<String, String> authResource = new HashMap<String, String>();
        authResource.put(PATH_RES_KEY, path.getPath());
        authResource.put(NAME_RES_KEY, path.getName());
        return authResource;
    }
1173005
public static PrototypeMeasurementFilter loadFromPath(String path) throws IOException {
    PrototypeMeasurementFilterSpecification spec =
        PrototypeMeasurementFilterSpecification.loadFromPath(path);
    return new PrototypeMeasurementFilter(spec);
  }
372158
public static Image newImage (String path, String... styles)
    {
        return setStyleNames(new Image(path), styles);
    }
158245
public ISO9660Directory addPath(String path) throws HandlerException {
        ISO9660Directory dir;
        if (path.indexOf(File.separator) == -1) {
            // Path is a directory - add it if not already listed
            return checkDirectory(path);
        }

        // Add path recursively
        int frontSeparatorIndex = path.indexOf(File.separator);
        String dirName = path.substring(0, frontSeparatorIndex);
        dir = checkDirectory(dirName);
        String rest = path.substring(frontSeparatorIndex + 1);
        dir = dir.addPath(rest);

        return dir;
    }
776282
public static HttpFileBuilder ofResource(ClassLoader classLoader, String path) {
        requireNonNull(classLoader, "classLoader");
        requireNonNull(path, "path");

        // Strip the leading slash.
        if (path.startsWith("/")) {
            path = path.substring(1);
        }

        // Retrieve the resource URL.
        final URL url = classLoader.getResource(path);
        if (url == null || url.getPath().endsWith("/")) {
            // Non-existent resource.
            return new NonExistentHttpFileBuilder();
        }

        // Convert to a real file if possible.
        if ("file".equals(url.getProtocol())) {
            File f;
            try {
                f = new File(url.toURI());
            } catch (URISyntaxException ignored) {
                f = new File(url.getPath());
            }

            return of(f);
        }

        return new ClassPathHttpFileBuilder(url);
    }
1150279
public static String getUrl(String path) {
        if (path == null) {
            return path;
        }

        ServletContext sc = ExecutionContext.getSession().getServletContext();

        if (path.startsWith("jar:")) {
            int i = path.indexOf("!");
            path = i < 0 ? path : path.substring(++i);
        }

        path = sc.getContextPath() + path;
        return path;
    }
1285321
public BufferedImage getCachedBufferedImageOfIconInOS(Path path) {
		return getSpecialPathAsOpt(path)
				.map(getCachedBufferedImageFunction(path))
				.orElseGet(() -> buildCachedBufferedImageOfFileIconInOS(path));
	}
1237210
private HttpURLConnection createHeadConnection(String path) throws IOException {
        HttpURLConnection connection = createHttpURLConnectionToMassive(path);
        connection.setRequestMethod("HEAD");
        return connection;
    }