maximumtag.java
来自「說明JSP平台、開發環境」· Java 代码 · 共 29 行
JAVA
29 行
package taglib;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
// import java.io.IOException;
public class maximumTag extends TagSupport {
private int x = 0;
private int y = 0;
public void setX(int x) {
this.x = x;
}
public void setY(int y) {
this.y = y;
}
public int doStartTag() throws JspException {
JspWriter out = pageContext.getOut();
int z = 0;
z = (x >= y) ? x : y;
try {
out.println("<font color='blue'><b>" + z + "</b></font>");
} catch (Exception e) {
throw new JspException("Error: " + e.toString());
}
return SKIP_BODY;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?