?? repeatsimpletag.java
字號:
package tw.com.javaworld.CH16;
import java.io.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class RepeatSimpleTag extends SimpleTagSupport {
private int count = 0;
private JspFragment fragment;
public void setCount(int count) {
this.count = count;
}
public void setFragment(JspFragment fragment) {
this.fragment = fragment;
}
public void doTag() throws JspException, IOException {
JspContext ctx = getJspContext();
JspWriter out = ctx.getOut();
for(int i=0 ; i<count ; i++) {
fragment.invoke(null);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -