1 53 54 106 107 package com.Yasna.forum.tags; 108 109 import java.io.*; 110 import javax.servlet.*; 111 import javax.servlet.jsp.*; 112 import javax.servlet.jsp.tagext.*; 113 import javax.servlet.http.*; 114 import com.Yasna.forum.tags.*; 115 116 142 public class TrueTag extends TagSupport 143 { 144 private String eval = null; 146 147 152 public final int doStartTag() throws JspException 153 { 154 Boolean res; 155 156 res = (Boolean )pageContext.getAttribute(eval,PageContext.PAGE_SCOPE); 157 if( res == null ) 158 throw new JspException("Jive true tag could not find eval \"" + 159 eval + "\""); 160 if( res.booleanValue() ) 161 return EVAL_BODY_INCLUDE; 162 return SKIP_BODY; 163 } 164 165 168 public final void setEval(String nam) 169 { 170 eval = nam; 171 } 172 173 } 174 | Popular Tags |