1 18 19 20 package org.apache.struts.taglib.bean; 21 22 23 import javax.servlet.jsp.tagext.TagData ; 24 import javax.servlet.jsp.tagext.TagExtraInfo ; 25 import javax.servlet.jsp.tagext.VariableInfo ; 26 27 28 34 35 public class PageTei extends TagExtraInfo { 36 37 38 41 public VariableInfo [] getVariableInfo(TagData data) { 42 43 String type = null; 44 String property = data.getAttributeString("property"); 45 if ("application".equalsIgnoreCase(property)) 46 type = "javax.servlet.ServletContext"; 47 else if ("config".equalsIgnoreCase(property)) 48 type = "javax.servlet.ServletConfig"; 49 else if ("request".equalsIgnoreCase(property)) 50 type = "javax.servlet.ServletRequest"; 51 else if ("response".equalsIgnoreCase(property)) 52 type = "javax.servlet.ServletResponse"; 53 else if ("session".equalsIgnoreCase(property)) 54 type = "javax.servlet.http.HttpSession"; 55 else 56 type = "java.lang.Object"; 57 58 return new VariableInfo [] { 59 new VariableInfo (data.getAttributeString("id"), 60 type, 61 true, 62 VariableInfo.AT_BEGIN) 63 }; 64 65 } 66 67 68 } 69 | Popular Tags |