if (uri.endsWith("/")) pathbuffer.append('/');
    String getPathInfo(HttpServletRequest req)            throws DecoderException, UnsupportedEncodingException {        StringTokenizer t = new StringTokenizer(req.getContextPath(), "/");        int prefixTokens = t.countTokens();        t = new StringTokenizer(req.getServletPath(), "/");        prefixTokens += t.countTokens();        String uri = req.getRequestURI();        t = new StringTokenizer(uri, "/");        int uriTokens = t.countTokens();        StringBuffer pathbuffer = new StringBuffer();        for (int i = 0; i < uriTokens; i++) {            String token = t.nextToken();            if (i < prefixTokens) {                continue;            }            if (i > prefixTokens) {                pathbuffer.append('/');            }            pathbuffer.append(UrlEncoded.smartDecode(token, defaultEncoding));        }                // append trailing "/" if it is contained in original URI        if (uri.endsWith("/"))            pathbuffer.append('/');        return pathbuffer.toString();    }