1 16 package org.apache.taglibs.dbtags.resultset; 17 18 import java.io.IOException ; 19 import java.sql.Types ; 20 21 import javax.servlet.jsp.JspTagException ; 22 23 84 public class GetDateTag extends BaseDateTimeGetterTag { 85 86 public int doStartTag() throws JspTagException { 87 88 try { 89 int position = getPosition(); 90 91 String date = getDateAsString(position,Types.DATE); 92 93 if (date == null) { 95 return EVAL_BODY_INCLUDE; 96 } 97 98 if (_attributeName != null) { 99 setAttribute(_attributeName, date, _scope); 100 } else { 101 pageContext.getOut().write(date); 102 } 103 } catch (IOException e) { 104 throw new JspTagException (e.toString()); 105 } 106 107 return EVAL_BODY_INCLUDE; 108 109 } 110 111 } 112 | Popular Tags |