1 25 package org.snipsnap.jsp; 26 27 import org.radeox.util.logging.Logger; 28 import org.snipsnap.app.Application; 29 import org.snipsnap.snip.Snip; 30 31 import javax.servlet.jsp.JspException ; 32 import javax.servlet.jsp.JspWriter ; 33 import javax.servlet.jsp.tagext.TagSupport ; 34 import java.io.IOException ; 35 36 public class CoordinatesTag extends TagSupport { 37 Snip snip = null; 38 39 public int doStartTag() throws JspException { 40 try { 41 JspWriter out = pageContext.getOut(); 42 Application app = Application.get(); 43 String coordinates = app.getConfiguration().getGeoCoordinates(); 44 if (null != coordinates) { 46 out.print("<meta name=\"ICBM\" content=\""); 47 out.print(coordinates); 48 out.print("\"/>"); 49 } 50 } catch (IOException e) { 51 Logger.warn("CoordinatesTag: unable print to JSP writer", e); 52 } 53 return super.doStartTag(); 54 } 55 } 56 | Popular Tags |