01: /*
02: * MyTagHandler.java
03: *
04: * Created on 24. erven 2004, 17:16
05: */
06:
07: package test;
08:
09: import javax.servlet.jsp.tagext.*;
10: import javax.servlet.jsp.JspWriter;
11: import javax.servlet.jsp.JspException;
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 {
26:
27: JspWriter out = getJspContext().getOut();
28:
29: try {
30: getJspContext().getOut().write("Hello, world!");
31: } catch (java.io.IOException ex) {
32: throw new JspException(ex.getMessage());
33: }
34:
35: }
36: }
|