1 37 package net.sourceforge.cruisecontrol.taglib; 38 39 import java.io.File ; 40 41 import javax.servlet.jsp.JspException ; 42 import javax.servlet.jsp.tagext.Tag ; 43 44 import net.sourceforge.cruisecontrol.BuildInfo; 45 import net.sourceforge.cruisecontrol.BuildInfoSummary; 46 47 51 public class BuildInfoTag extends CruiseControlTagSupport { 52 53 public static final String INFO_ATTRIBUTE = "build_info"; 54 55 56 59 public int doEndTag() throws JspException { 60 File logDir = findLogDir(); 61 BuildInfoSummary buildInfoSummary = BuildInfo.loadFromDir(logDir); 62 getPageContext().setAttribute(INFO_ATTRIBUTE, buildInfoSummary); 63 return Tag.EVAL_PAGE; 64 } 65 66 69 public int doStartTag() throws JspException { 70 return Tag.SKIP_BODY; 71 } 72 } 73 | Popular Tags |