if (originalHref.startsWith("/") && !originalHref.contains(request.getContextPath())) {
if (originalHref.startsWith("/") && !originalHref.contains(request.getContextPath() + "/")) {
    public int doEndTag() throws JspException {        HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();        HttpServletResponse response = (HttpServletResponse) getPageContext().getResponse();        String originalHref = getHref(); // Save for later, so we can restore the value        if (originalHref != null) {            String href = originalHref;            // Append the context path, but only if the user didn't already            if (originalHref.startsWith("/") && !originalHref.contains(request.getContextPath())) {                href = request.getContextPath() + href;            }            UrlBuilder builder = new UrlBuilder(href);            builder.addParameter(StripesConstants.URL_KEY_SOURCE_PAGE, request.getServletPath());            builder.addParameters(this.parameters);            setHref(response.encodeURL(builder.toString()));        }        try {            writeOpenTag(getPageContext().getOut(), "a");            String body = getBodyContentAsString();            if (body != null) {                getPageContext().getOut().write(body.trim());            }            writeCloseTag(getPageContext().getOut(), "a");        }        catch (IOException ioe) {            throw new StripesJspException("IOException while writing output in LinkTag.", ioe);        }        // Restore state and go on with the page        setHref(originalHref);        this.parameters.clear();        return EVAL_PAGE;    }