?? simpleiterator.java
字號(hào):
package cn.tag;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
public class SimpleIterator extends SimpleTagSupport {
protected int count = 0; //記錄循環(huán)次數(shù)
public void setCount(int count){
this.count = count;
}
public int getCount(){
return count;
}
//下面為主體調(diào)用方法
public void doTag() throws JspException,IOException{
for(int i=0;i<count;i++){
getJspContext().setAttribute("count",String.valueOf(i+1));
getJspBody().invoke(null);
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -