FormTag.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:lams 作者:
/**
 * Render the end of this form.
 *
 * @exception JspException if a JSP exception has occurred
 */
public int doEndTag() throws JspException {

    // Remove the page scope attributes we created
    pageContext.removeAttribute(Constants.BEAN_KEY, PageContext.REQUEST_SCOPE);
    pageContext.removeAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE);

    // Render a tag representing the end of our current form
    StringBuffer results = new StringBuffer("</form>");

    // Render JavaScript to set the input focus if required
    if (this.focus != null) {
        results.append(this.renderFocusJavascript());
    }

    // Print this value to our output writer
    JspWriter writer = pageContext.getOut();
    try {
        writer.print(results.toString());
    } catch (IOException e) {
        throw new JspException(messages.getMessage("common.io", e.toString()));
    }

    // Continue processing this page
    return (EVAL_PAGE);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号