public WebRestRef getWebRestRef(RequestContext rc,String resourcePath){
if (resourcePath == null){
resourcePath = rc.getResourcePath();
}
HttpMethod method = rc.getMethod();
WebRestRef ref = null;
// first, check if there is a perfect match.
Map<String,WebRestRef> refByPath = getRefByPath(method);
if (refByPath != null){