Retrieves the RESTeasy mapping prefix - this is the path under the webapp root where RESTeasy services are mapped.

@param context

@return
349658
@Provides
	@Singleton
	@Named(GuiceProperties.REST_SERVICES_PREFIX)
	public String getRestServicesPrefix(ServletContext context)
	{
		String restPath = context.getInitParameter(RESTEASY_MAPPING_PREFIX);

		if (restPath == null || restPath.isEmpty() || restPath.equals("/"))
		{
			return "";
		}
		else
		{
			return restPath;
		}
	}
144417
public static String contextAsString(final Set<Attribute> context) {
        StringBuilder sb = new StringBuilder();
        for (Attribute attribute : context) {
            if(sb.length()<1) {
                sb.append("{");
            }else {
                sb.append(", ");
            }
            sb.append(Attribute.propertyKeyForURIBase(attribute, EnvironmentalContext.URI_BASE))
              .append("=")
              .append(attribute.getValue())
              ;
        }
        sb.append("}");
        return sb.toString();
    }
601497
public String getContextPath() {
        ServletRequest request = pageContext.getRequest();
        if (request instanceof HttpServletRequest) {
            return ((HttpServletRequest) request).getContextPath();
        }
        return "/";
    }
274179
protected String getRequestName(InvocationContext context) {
		final Method method = context.getMethod();
		return method.getDeclaringClass().getSimpleName() + '.' + method.getName();
	}
415969
private static String getPath(Service service, Annotation... qualifiers) {
        for (Annotation q : qualifiers) {
            if (q instanceof Scheme) {
                return ((Scheme) q).value();
            }
        }

        if (service.getMetadata() != null && service.getMetadata().getAnnotations() != null) {
            String s = service.getMetadata().getAnnotations().get(SERVICE_SCHEME);
            if (s != null && s.isEmpty()) {
                return s;
            }
        }
        return DEFAULT_PATH;
    }
844119
private String getContextPath() {
    ClassLoader loader = getClass().getClassLoader();
    if(loader == null)
     return null;
    URL url = loader.getResource("/");
    if (url != null) {
      String[] elements = url.toString().split("/");
      for (int i = elements.length - 1; i > 0; --i) {
        // URLs look like this: file:/.../ImageServer/WEB-INF/classes/
        // And we want that part that's just before WEB-INF
        if ("WEB-INF".equals(elements[i])) {
          return elements[i - 1];
        }
      }
    }
    return null;
  }
106946
public final String getPrefix() {
		if ((prefix == null || prefix.isEmpty()) && (configuration != null)) {
			prefix = configuration.getPrefix();
		}
		return prefix;
	}
698767
@Nonnull
  public static String getServletContextBasePath (@Nonnull final ServletContext aSC)
  {
    String sPath = aSC.getRealPath (".");
    if (sPath == null)
    {
      // Fallback for Undertow
      sPath = aSC.getRealPath ("");
    }
    if (StringHelper.hasNoText (sPath))
      throw new IllegalStateException ("Failed to determine real path of ServletContext " + aSC);
    return sPath;
  }
1293939
@Override
    public String getPath() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getPath();
        return null;
    }
28772
public static final String getRequestUriWithoutContextPath(HttpServletRequest request) {
        String uri = request.getRequestURI().substring(request.getContextPath().length());
        if (!uri.isEmpty()) {
            return uri;
        } else {
            return "/";
        }
    }
396831
private Map<String, Object> resolveDependencyContext() {
        Map<String, Object> dependencyContextMap = new HashMap<>();

        ServiceLoader<DependencyContext> dependencyContextLoader = ServiceLoader.load(DependencyContext.class);
        for (DependencyContext context : dependencyContextLoader) {
            dependencyContextMap.put(context.getName(), context);
        }

        return dependencyContextMap;
    }
215574
protected String parseRequestUriWithoutContextPath(HttpServletRequest req){
        String requestUri = req.getRequestURI();
        String contextPath = req.getContextPath();
        requestUri = requestUri.substring(contextPath.length());
        if(requestUri.startsWith("/")){
            return requestUri;
        }else {
            return "/"+requestUri;
        }
    }
282859
@Override
	public String getApplicationPath() {
		return request.getScheme() + "://" + request.getServerName()
			+ (request.getServerPort() != 80? ":" + request.getServerPort() : "")
			+ request.getContextPath();
	}
658200
public String getPrefix(String namespaceURI)
   {
      String prefix = null;
      try
      {
         prefix = namespaceRegistry.getPrefix(namespaceURI);
      }
      catch (NamespaceException exc)
      {
         prefix = prefixes.get(namespaceURI);
      }
      catch (RepositoryException exc)
      {
         log.error(exc.getMessage(), exc);
      }
      return prefix;

   }
468554
@Override
    public String getRestURI(String baseServiceURI) {

        StringBuilder requestURI = new StringBuilder();
        
        requestURI.append(baseServiceURI);

        if (StringUtils.isNotBlank(entityName)) {
            appendToURI(requestURI, entityName);
            if (StringUtils.isNotBlank(entityVersion)) {
                appendToURI(requestURI, entityVersion);
            }
        }
        if (StringUtils.isNotBlank(getOperationPathParam())) {
            appendToURI(requestURI, getOperationPathParam());
        }

        return requestURI.toString();
    }
1081235
public static String getContextPath(ServletContext servletContext) {
		String contextPath = DEFAULT_CONTEXT_PATH;

		// Get the context path
		if (servletContext != null) {
			contextPath = servletContext.getContextPath();
			if (StringUtils.isEmpty(contextPath)) {
				contextPath = DEFAULT_CONTEXT_PATH;
			}
		}

		return contextPath;
	}
1217520
protected Context getContext() {
        if (context == null) {
            context = getTomcat().addContext(getConfig().getContextPath(),
                    getConfig().getContextRootDirectory().getAbsolutePath());
        }
        return context;
    }