Subversion Repositories general

Rev

Rev 993 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package ak.backpath.taglib;

import javax.servlet.jsp.JspException;
import ak.backpath.BackPath;

public class ForwardLinkTag extends LinkTagBase
{
    protected String calculateURL() throws JspException
    {
        String url = super.calculateURL();
        if(url == null) return null;

        String params = findBackPath().getForwardParams();
                if(params == null) return url;

                params = params.replaceAll("&", "&");
        if(url.indexOf("?") > 0)
                return url + "&" + backPathParam + "=" + params;
        else
                return url + "?" + backPathParam + "=" + params;
    }
}