tw.com.javaworld.CH15.Hello_TEI (Java2HTML)

| Hello_TEI.java |

    1 package tw.com.javaworld.CH15;
    2
    3 import javax.servlet.jsp.*;
    4 import javax.servlet.jsp.tagext.*;
    5 import java.io.*;
    6
    7 public class Hello_TEI extends TagSupport {
    8
    9     public int doStartTag() {
    10        try {
    11            JspWriter out = pageContext.getOut();
    12            out.println("Hello World Use Tag Library");
    13            pageContext.setAttribute("Message","Use TEI");
    14
    15        } catch (Exception e) {
    16            System.out.println("Hello Tag Error :" + e);
    17        }
    18        return (SKIP_BODY);
    19    }
    20}