| 1 22 23 package org.cofax.taglibs; 24 25 import javax.servlet.*; 26 import javax.servlet.jsp.*; 27 import javax.servlet.jsp.tagext.*; 28 import org.cofax.*; 29 30 38 public class PutTag extends TagSupport { 39 40 private String name = ""; 42 43 private String value = ""; 44 45 48 public void setName(String name) { 49 50 if (name != null && !name.equals("")) { 51 this.name = name; 52 } 53 } 54 55 58 public String getName() { 59 return (name); 60 } 61 62 65 public void setValue(String value) { 66 if (value != null && !value.equals("")) { 67 this.value = value; 68 } 69 } 70 71 74 public String getValue() { 75 return (value); 76 } 77 78 81 public int doEndTag() throws JspException { 82 ServletRequest req = pageContext.getRequest(); 83 CofaxPage cofaxPage = (CofaxPage) req.getAttribute("cofaxPage"); 84 cofaxPage.putGlossaryValue(this.name, this.value); 85 return (SKIP_BODY); 86 } 87 88 } 90 | Popular Tags |