code: @Provides
  	@Singleton
  	@Named(GuiceProperties.LOCAL_REST_SERVICES_ENDPOINT)
  	public URI getRestServicesEndpoint(@Named(GuiceProperties.STATIC_ENDPOINT_CONFIG_NAME) URI webappUri,
  	                                   @Named(GuiceProperties.REST_SERVICES_PREFIX) String restPrefix,
  	                                   ServletContext context)
  	{
  		if (restPrefix.equals(""))
  		{
  			// resteasy mapped to /
  			return webappUri;
  		}
  		else
  		{
  			// Strip the leading / from the restpath
  			while (restPrefix.startsWith("/"))
  				restPrefix = restPrefix.substring(1);
  
  			final String webappPath = webappUri.toString();
  
  			if (webappPath.endsWith("/"))
  				return URI.create(webappPath + restPrefix);
  			else
  				return URI.create(webappPath + "/" + restPrefix);
  		}
  	}
docs: Return the base path for all REST services in this webapp
  
  @param webappUri
  @param restPrefix
  the prefix for rest services (added after the webapp endpoint to form the base path for the JAX-RS container)
  @param context
  
  @return