⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newtag.java

📁 学生管理系统
💻 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 + -