src/org/nutz/mvc/Mvcs.java
public static RequestPath getRequestPathObject(String url) {
        RequestPath rr = new RequestPath();
        rr.setUrl(url);
        if (null != url) {
            int lio = 0;
            if (!url.endsWith("/")) {
                int ll = url.lastIndexOf('/');
                lio = url.lastIndexOf('.');
                if (lio < ll)
                    lio = -1;
            }
            if (lio > 0) {
                rr.setPath(url.substring(0, lio));
                rr.setSuffix(url.substring(lio + 1));
            } else {
                rr.setPath(url);
                rr.setSuffix("");
            }
        } else {
            rr.setPath("");
            rr.setSuffix("");
        }
        return rr;
    }
public static RequestPath getRequestPathObject(String url) {
        RequestPath rr = new RequestPath();
        rr.setUrl(url);
        if (null != url) {
            int lio = 0;
            if (!url.endsWith("/")) {
                int ll = url.lastIndexOf('/');
                lio = url.lastIndexOf('.');
                if (lio < ll)
                    lio = -1;
            }
            if (lio > 0) {
                rr.setPath(url.substring(0, lio));
                rr.setSuffix(url.substring(lio + 1));
            } else {
                rr.setPath(url);
                rr.setSuffix("");
            }
        } else {
            rr.setPath("");
            rr.setSuffix("");
        }
        return rr;
    }
public static RequestPath getRequestPathObject ( String url ) { RequestPath rr = new RequestPath ( ) ; rr . setUrl ( url ) ; if ( null != url ) { int lio = 0 ; if ( ! url . endsWith ( "/" ) ) { int ll = url . lastIndexOf ( ' ' ) ; lio = url . lastIndexOf ( ' ' ) ; if ( lio < ll ) lio = - 1 ; } if ( lio > 0 ) { rr . setPath ( url . substring ( 0 , lio ) ) ; rr . setSuffix ( url . substring ( lio + 1 ) ) ; } else { rr . setPath ( url ) ; rr . setSuffix ( "" ) ; } } else { rr . setPath ( "" ) ; rr . setSuffix ( "" ) ; } return rr ; }
获取当前请求的路径，并去掉后缀

@param url
请求路径的URL
获取当前请求的路径，并去掉后缀