KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > MyTagHandler


1 /*
2  * MyTagHandler.java
3  *
4  * Created on 24. erven 2004, 17:16
5  */

6  
7 package test;
8
9 import javax.servlet.jsp.tagext.*;
10 import javax.servlet.jsp.JspWriter JavaDoc;
11 import javax.servlet.jsp.JspException JavaDoc;
12
13 /**
14  *
15  * @author lm97939
16  * @version
17  */

18
19 public class MyTagHandler extends SimpleTagSupport {
20
21     /**Called by the container to invoke this tag.
22     * The implementation of this method is provided by the tag library developer,
23     * and handles all tag processing, body iteration, etc.
24     */

25     public void doTag() throws JspException JavaDoc {
26         
27         JspWriter JavaDoc out=getJspContext().getOut();
28
29         try {
30             getJspContext().getOut().write( "Hello, world!" );
31         } catch (java.io.IOException JavaDoc ex) {
32             throw new JspException JavaDoc(ex.getMessage());
33         }
34
35     }
36 }
37
Popular Tags