1 6 7 package org.netbeans.test.taglibrary.handlers; 8 9 import javax.servlet.jsp.tagext.*; 10 import javax.servlet.jsp.JspWriter ; 11 import javax.servlet.jsp.JspException ; 12 13 18 19 public class HelloSimpleTagHandler extends SimpleTagSupport { 20 21 24 private java.lang.String name; 25 26 30 public void doTag() throws JspException { 31 32 JspWriter out=getJspContext().getOut(); 33 34 try { 35 out.println("<h3>Hello " + name + "</h3>"); 36 37 out.println("<pre>BODY:"); 38 39 JspFragment f=getJspBody(); 40 if (f != null) f.invoke(out); 41 42 out.println("\nEND</pre>"); 43 44 } catch (java.io.IOException ex) { 45 throw new JspException (ex.getMessage()); 46 } 47 48 } 49 50 53 public void setName(java.lang.String value) { 54 this.name = value; 55 } 56 } 57 | Popular Tags |