?? newtag.java
字號:
package cn.jl.student.servlet;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspWriter;
import java.io.IOException;
/**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 2008-8-22
* Time: 19:15:20
* To change this template use File | Settings | File Templates.
*/
public class NewTag extends TagSupport {
private String width = "";
private String height = "";
private String bgcolor = "";
public void setwidth(String width){
this.width = width;
}
public void setheight(String height) {
this.height = height;
}
public void setbgcolor(String bgcolor) {
this.bgcolor = bgcolor;
}
public int doStartTag(){
JspWriter out = pageContext.getOut();
try {
out.println("<table width='" + this.width + "',height='" + this.height + "',bgcolor='" + this.bgcolor + "'>");
out.println(" <tr>");
out.println(" <td>");
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
return EVAL_BODY_INCLUDE;
}
public int doEndTag(){
JspWriter out = pageContext.getOut();
try {
out.println(" </td>");
out.println(" </>tr");
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -