1 5 package com.opensymphony.oscache.web.tag; 6 7 import javax.servlet.jsp.JspTagException ; 8 import javax.servlet.jsp.tagext.TagSupport ; 9 10 15 public class GroupTag extends TagSupport { 16 private Object group = null; 17 18 public int doStartTag() throws JspTagException { 19 CacheTag ancestorCacheTag = (CacheTag) TagSupport.findAncestorWithClass(this, CacheTag.class); 20 21 if (ancestorCacheTag == null) { 22 throw new JspTagException ("GroupTag cannot be used from outside a CacheTag"); 23 } 24 25 ancestorCacheTag.addGroup(String.valueOf(group)); 26 return EVAL_BODY_INCLUDE; 27 } 28 29 public void setGroup(Object group) { 30 this.group = group; 31 } 32 } 33 | Popular Tags |