1 package com.quadcap.http.servlets.jsp; 2 3 40 41 import java.io.PrintWriter ; 42 43 import java.util.Hashtable ; 44 45 import org.xml.sax.AttributeList ; 46 47 import com.quadcap.util.Debug; 48 49 54 public class TagJspGetProperty extends TagJsp { 55 public TagJspGetProperty() {} 56 57 public TagJspGetProperty(TagContext context) { 58 super(context); 59 } 60 61 public TagInstance makeInstance(TagContext context) { 62 return new TagJspGetProperty(context); 63 } 64 65 public void doStartTag(String tagName, AttributeList attributes) 66 throws JspException 67 { 68 super.doStartTag(tagName, attributes); 69 PrintWriter w = context.getPrintWriter(); 70 String name = attributes.getValue("name"); 71 String prop = attributes.getValue("property"); 72 context.addPageDirective("import", 73 "com.quadcap.http.servlets.jsp.PropertyUtils"); 74 w.print(" out.print(PropertyUtils."); 75 w.print("getProperty("); 76 w.print(name); 77 w.print(", \""); 78 w.print(prop); 79 w.println("\"));"); 80 } 81 } 82 83 | Popular Tags |