日期:2014-05-18 浏览次数:20631 次
package cn.dzr.tag;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.IterationTag;
import javax.servlet.jsp.tagext.Tag;
public class QuinticOut implements IterationTag
{
int i = 5;
PageContext pageContext = null;
Tag parent;
@Override
public void setPageContext(PageContext pc)
{
this.pageContext = pc;
}
@Override
public void setParent(Tag t)
{
this.parent = t;
}
@Override
public Tag getParent()
{
return this.parent;
}
@Override
public int doStartTag() throws JspException
{
return Tag.EVAL_BODY_INCLUDE;
}
@Override
public int doEndTag() throws JspException
{
return Tag.EVAL_PAGE;
}
@Override
public void release()
{
}
@Override
public int doAfterBody() throws JspException
{
while((i--)>0)
return IterationTag.EVAL_BODY_AGAIN;
return IterationTag.SKIP_BODY;
}
}