(BaseApplicationServlet.ORIGINAL_CONTEXT_PATH_ATTRIBUTE);
(URL.ORIGINAL_CONTEXT_PATH_ATTRIBUTE);
    public static String encodeRedirectURL(HttpServletRequest req,                                           HttpServletResponse resp,                                           String url) {        if (s_log.isDebugEnabled()) {            s_log.debug("encodeRedirectURL: before: " + url);        }        if (url.startsWith("/")) {            String context = (String) req.getAttribute                (BaseApplicationServlet.ORIGINAL_CONTEXT_PATH_ATTRIBUTE);            String servlet = (String) req.getAttribute                (BaseApplicationServlet.ORIGINAL_SERVLET_PATH_ATTRIBUTE);            String prefix = "";            if (context != null && servlet != null) {                prefix = context + servlet;            }            url = resp.encodeRedirectURL(encodeParams(req, prefix + url));        } else {            url = resp.encodeRedirectURL(encodeParams(req, url));        }        if (s_log.isDebugEnabled()) {            s_log.debug("encodeRedirectURL:  after: " + url);        }        return url;    }