1 16 17 package org.apache.taglibs.standard.tag.common.core; 18 19 import java.util.StringTokenizer ; 20 21 import javax.servlet.jsp.JspTagException ; 22 import javax.servlet.jsp.jstl.core.LoopTagSupport; 23 24 34 35 public abstract class ForTokensSupport extends LoopTagSupport { 36 37 40 47 48 49 52 protected String items; protected String delims; protected StringTokenizer st; 56 57 60 64 65 protected void prepare() throws JspTagException { 66 st = new StringTokenizer (items, delims); 67 } 68 69 protected boolean hasNext() throws JspTagException { 70 return st.hasMoreElements(); 71 } 72 73 protected Object next() throws JspTagException { 74 return st.nextElement(); 75 } 76 77 78 81 82 public void release() { 84 super.release(); 85 items = delims = null; 86 st = null; 87 } 88 89 } 90 | Popular Tags |