1 23 24 package de.laures.cewolf.taglib.tags; 25 26 import java.io.IOException ; 27 28 import javax.servlet.jsp.JspException ; 29 30 35 public class ChartImgURLTag extends ChartImgTag { 36 37 public static final String VAR_NAME = "var"; 38 39 String var = null; 40 41 public int doEndTag() throws JspException { 42 try { 43 if(var == null){ 44 pageContext.getOut().write(getImgURL()); 45 } else { 46 pageContext.setAttribute(var, getImgURL()); 47 } 48 } catch(IOException ioex){ 49 log.error(ioex); 50 throw new JspException (ioex.getMessage()); 51 } 52 return doAfterEndTag(EVAL_PAGE); 53 } 54 55 58 protected void reset() { 59 super.reset(); 60 var = null; 61 } 62 63 67 public String getVar() { 68 return var; 69 } 70 71 75 public void setVar(String var) { 76 this.var = var; 77 } 78 79 } 80 | Popular Tags |