1 37 package net.sourceforge.cruisecontrol.taglib; 38 39 import javax.servlet.jsp.JspException ; 40 import javax.servlet.jsp.tagext.Tag ; 41 42 46 public class LogLinkTag extends CruiseControlTagSupport { 47 private static final String LOGS_SERVLET_URL = "logs"; 48 49 public int doStartTag() throws JspException { 50 getPageContext().setAttribute(getId(), createUrl()); 51 return Tag.SKIP_BODY; 52 } 53 54 private String createUrl() throws JspException { 55 StringBuffer url = new StringBuffer (); 56 url.append(LOGS_SERVLET_URL); 57 url.append(getProject()); 58 url.append("/"); 59 url.append(findLogFile().getName()); 60 return url.toString(); 61 } 62 } 63 | Popular Tags |