@Override protected String calculateURL() throws JspException { if (href != null) { int index = href.indexOf(':'); if (index > -1) { return super.calculateURL(); } return S2Functions.url(href); } return super.calculateURL(); } }
/** * Render the appropriately encoded URI. * * @exception JspException if a JSP exception has occurred */ public int doStartTag() throws JspException { // Print this element to our output writer StringBuffer results = new StringBuffer("<frame"); prepareAttribute(results, "src", calculateURL()); prepareAttribute(results, "name", getFrameName()); if (noresize) { results.append(" noresize=\"noresize\""); } prepareAttribute(results, "scrolling", getScrolling()); prepareAttribute(results, "marginheight", getMarginheight()); prepareAttribute(results, "marginwidth", getMarginwidth()); prepareAttribute(results, "frameborder", getFrameborder()); prepareAttribute(results, "longdesc", getLongdesc()); results.append(prepareStyles()); prepareOtherAttributes(results); results.append(getElementClose()); TagUtils.getInstance().write(pageContext,results.toString()); return (SKIP_BODY); }
/** * Render the beginning of the hyperlink. * <p> * Support for indexed property since Struts 1.1 * * @exception JspException if a JSP exception has occurred */ public int doStartTag() throws JspException { // Generate the opening anchor element StringBuffer results = new StringBuffer("<a"); // Special case for name anchors prepareAttribute(results, "name", getLinkName()); // * @since Struts 1.1 if (getLinkName() == null || getForward() != null || getHref() != null || getPage() != null || getAction() != null) { prepareAttribute(results, "href", calculateURL()); } prepareAttribute(results, "target", getTarget()); prepareAttribute(results, "accesskey", getAccesskey()); prepareAttribute(results, "tabindex", getTabindex()); results.append(prepareStyles()); results.append(prepareEventHandlers()); prepareOtherAttributes(results); results.append(">"); TagUtils.getInstance().write(pageContext, results.toString()); // Evaluate the body of this tag this.text = null; return (EVAL_BODY_TAG); }