footag.java
来自「It gives some some of examples of java s」· Java 代码 · 共 91 行
JAVA
91 行
package examples;import javax.servlet.jsp.*;import javax.servlet.jsp.tagext.*;import java.util.Hashtable;import java.io.Writer;/** * Example1: the simplest tag * Collect attributes and call into some actions * * <foo att1="..." att2="...." att3="...." /> */public class FooTag extends TagSupport { /** * Create a new Foo tag handler */ public FooTag() { super(); } /** * Attributes for this action: * att1 * att2 * att3 */ /** * Attribute: att1 * setter and getter */ public void setAtt1(String s) { att1 = s; } public String getAtt1() { return att1; } /** * Attribute: att2 * setter and getter */ public void setAtt2(String s) { att2 = s; } public String getAtt2() { return att2; } /** * Attribute: att3 * setter and getter */ public void setAtt3(String s) { att3 = s; } public String getAtt3() { return att3; } /** * Process start tag * * @return SKIP_BODY */ public int doStartTag() { // do whatever you want with "att1", "att2", "att3" return SKIP_BODY; } /** * Release */ public void release() { att1 = att2 = att3 = null; super.release(); } /* * Private data */ private String att1; private String att2; private String att3;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?