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 162 163 public class SetYazdPropertyTag extends BodyTagSupport 164 { 165 private String name = null; 166 private String property = null; 167 private String val; 168 169 174 public final int doStartTag() throws JspException 175 { 176 return EVAL_BODY_TAG; 177 } 178 179 185 public final int doAfterBody() throws JspException 186 { 187 BodyContent body = getBodyContent(); 189 String s = body.getString(); 190 body.clearBody(); 192 193 YazdProperty jp = 195 (YazdProperty)pageContext.getAttribute(name.toString(), 196 PageContext.PAGE_SCOPE); 197 if( jp != null ) { 199 jp.setProperty(property,s); 200 } 201 return SKIP_BODY; 202 } 203 204 207 public final void setName(String nam) 208 { 209 name = nam; 210 } 211 212 215 public final void setProperty(String prop) 216 { 217 property = prop; 218 } 219 } 220 | Popular Tags |