@Override
public int doEndTag() throws JspException {
BodyContent body = this.getBodyContent();
String value = body.getString();
URLTag parentTag = null;
try {
Tag tag = this;
do {
tag = tag.getParent();
} while (!(tag instanceof URLTag));
parentTag = (URLTag) tag;
} catch (RuntimeException e) {
throw new JspException("Error nesting parameter in url tag.", e);
}
parentTag.addParameter(this.getName(), value);
return EVAL_PAGE;
}