1 16 package org.apache.taglibs.string; 17 18 import javax.servlet.jsp.JspException ; 19 20 25 public class LengthTag extends StringTagSupport { 26 27 public LengthTag() { 28 super(); 29 } 30 31 32 public String changeString(String text) throws JspException { 33 if(text == null) { 34 return ""; 35 } else { 36 return String.valueOf(text.length()); 37 } 38 } 39 40 public void initAttributes() { 41 42 } 43 44 45 } 46 | Popular Tags |