    private UrlMappingInfo createUrlMappingInfo(String uri, Matcher m) {
        Map params = new HashMap();
        Errors errors = new MapBindingResult(params, "urlMapping");
        String lastGroup = null;
        for (int i = 0; i < m.groupCount(); i++) {
            lastGroup = m.group(i+1);
            if(constraints.length > i) {
                ConstrainedProperty cp = constraints[i];
                cp.validate(this,lastGroup, errors);
                if(errors.hasErrors()) return null;
                else {
                    params.put(cp.getPropertyName(), lastGroup);
                }
            }
        }
        if(lastGroup!= null) {
            String remainingUri = uri.substring(uri.lastIndexOf(lastGroup)+lastGroup.length());
            if(remainingUri.length() > 0) {
                if(remainingUri.startsWith(SLASH))remainingUri = remainingUri.substring(1);
                String[] tokens = remainingUri.split(SLASH);
                for (int i = 0; i < tokens.length; i=i+2) {
                    String token = tokens[i];
                    if((i+1) < tokens.length) {
                        params.put(token, tokens[i+1]);
                    }
                }
            }
        }
        for (Iterator i = this.parameterValues.keySet().iterator(); i.hasNext();) {
            Object key =  i.next();
            params.put(key, this.parameterValues.get(key));            
        }
        if(controllerName == null) {
            this.controllerName = createRuntimeConstraintEvaluator(GrailsControllerClass.CONTROLLER, this.constraints);
        }
        if(actionName == null) {
            this.actionName = createRuntimeConstraintEvaluator(GrailsControllerClass.ACTION, this.constraints);
        }
        if(viewName == null) {
            this.viewName = createRuntimeConstraintEvaluator(GrailsControllerClass.VIEW, this.constraints);
        }
        if (viewName != null && this.controllerName == null) {
           return new DefaultUrlMappingInfo(viewName, params,this.urlData);
        }
        else {
            return new DefaultUrlMappingInfo(this.controllerName, this.actionName,getViewName(), params,this.urlData);
        }
    }

    private UrlMappingInfo createUrlMappingInfo(String uri, Matcher m) {
        Map params = new HashMap();
        Errors errors = new MapBindingResult(params, "urlMapping");
        String lastGroup = null;
        for (int i = 0; i < m.groupCount(); i++) {
            lastGroup = m.group(i+1);
            int j = lastGroup.indexOf('?');
            if(j >-1) {
                lastGroup = lastGroup.substring(0,j);
            }
            if(constraints.length > i) {
                ConstrainedProperty cp = constraints[i];
                cp.validate(this,lastGroup, errors);
                if(errors.hasErrors()) return null;
                else {
                    params.put(cp.getPropertyName(), lastGroup);
                }
            }
        }
        if(lastGroup!= null) {
            String remainingUri = uri.substring(uri.lastIndexOf(lastGroup)+lastGroup.length());
            if(remainingUri.length() > 0) {
                if(remainingUri.startsWith(SLASH))remainingUri = remainingUri.substring(1);
                String[] tokens = remainingUri.split(SLASH);
                for (int i = 0; i < tokens.length; i=i+2) {
                    String token = tokens[i];
                    if((i+1) < tokens.length) {
                        params.put(token, tokens[i+1]);
                    }
                }
            }
        }
        for (Iterator i = this.parameterValues.keySet().iterator(); i.hasNext();) {
            Object key =  i.next();
            params.put(key, this.parameterValues.get(key));            
        }
        if(controllerName == null) {
            this.controllerName = createRuntimeConstraintEvaluator(GrailsControllerClass.CONTROLLER, this.constraints);
        }
        if(actionName == null) {
            this.actionName = createRuntimeConstraintEvaluator(GrailsControllerClass.ACTION, this.constraints);
        }
        if(viewName == null) {
            this.viewName = createRuntimeConstraintEvaluator(GrailsControllerClass.VIEW, this.constraints);
        }
        if (viewName != null && this.controllerName == null) {
           return new DefaultUrlMappingInfo(viewName, params,this.urlData);
        }
        else {
            return new DefaultUrlMappingInfo(this.controllerName, this.actionName,getViewName(), params,this.urlData);
        }
    }
