import   java.io.IOException;   
  import   javax.servlet.jsp.JspException;   
  import   javax.servlet.jsp.tagext.BodyTagSupport;   
  import   org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;   
    
  public   class   tag3   extends   BodyTagSupport   
  {   
    private   Object   value   =   null;   
    private   Object   output   =   null;   
    
    public   void   setOutput(Object   output)   
    {   
      this.output   =   output;   
    }   
    public   Object   getValue()   
    {   
      return   value;   
    }   
    public   void   setValue(Object   value)throws   JspException   
    {   
      this.value   =   ExpressionEvaluatorManager.evaluate(   
                          "value",   value.toString(),   Object.class,   this,   pageContext);   
    }   
    public   int   doStartTag()   
    {   
      return   EVAL_BODY_INCLUDE;   
    }   
    public   int   doEndTag()throws   JspException   
    {   
      try   
      {         
        pageContext.getOut().print(output);   
      }   
      catch   (IOException   e)   
      {   
        throw   new   JspException(e);   
      }   
      return   EVAL_PAGE;   
    }   
  }   
  --------------------------------------------   
  package   jsp;   
    
  import   javax.servlet.jsp.JspException;   
  import   javax.servlet.jsp.tagext.BodyTagSupport;   
  import   org.apache.commons.beanutils.PropertyUtils;   
    
  public   class   tag4   extends   BodyTagSupport   
  {   
    private   String   property   =   null;   
    
    public   void   setProperty(String   property)   
    {   
      this.property   =   property;   
    }   
    
    public   int   doEndTag()throws   JspException   
    {       
    tag3   parent   =(tag3)getParent();       
      if(parent==null)     
        throw   new   JspException("Can   not   find   parent   Tag   ");   
      try   
      {     
        Object   propertyValue   =   PropertyUtils.getProperty(parent.getValue(),   property);   
        parent.setOutput(propertyValue);   
      }   
      catch   (Exception   e)   
      {   
        throw   new   JspException(e);   
      }   
      return   EVAL_PAGE;   
    }   
  }   
  -----------------------------------------   
  package   jsp.vo;   
    
  public   class   Man   
  {   
    private   String   name   =   null;   
    private   int   age   =   0;   
    public   static   String   tou(String   s)   {   
            return   s;   
        }   
    
    public   int   getAge()   
    {   
      return   age;   
    }   
    public   void   setAge(int   age)   
    {   
      this.age   =   age;   
    }   
    public   String   getName()   
    {   
      return   name;   
    }   
    public   void   setName(String   name)   
    {   
      this.name   =   name;   
    }   
  }   
  ------------------------------------------   
  <?xml   version="1.0"   encoding="ISO-8859-1"   ?>   
  <!DOCTYPE   taglib   
      PUBLIC   "-//Sun   Microsystems,   Inc.//DTD   JSP   Tag   Library   1.2//EN"   
      "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">   
  <taglib>   
    <tlib-version>1.0</tlib-version>   
    <jsp-version>1.2</jsp-version>   
    <short-name>gq</short-name>       
    
  <tag>   
      <name>with</name>   
      <tag-class>jsp.tag3</tag-class>   
      <body-content>JSP</body-content>   
      <attribute>   
        <name>value</name>   
        <required>false</required>   
        <rtexprvalue>true</rtexprvalue>   
      </attribute>   
    </tag>   
    
    <tag>   
      <name>nestedout</name>   
      <tag-class>jsp.tag4</tag-class>   
      <body-content>empty</body-content>   
      <attribute>   
        <name>property</name>   
        <required>false</required>   
        <rtexprvalue>false</rtexprvalue>   
      </attribute>   
    </tag>   
  </taglib>   
  ----------------------------------------   
  <%@   page   contentType="text/html;charset=GBK"%>   
  <%@   page   import="jsp.vo.Man"%>   
  <%@   taglib   uri="/WEB-INF/tlds/gq.tld"   prefix="gq"%>   
  <%   
  Man   man   =   new   Man();   
  man.setName("gq");   
  request.setAttribute("man",man);   
  %>   
  <gq:with   value="${man}">   
    <gq:nestedout   property="name"/>   
  </gq:with>   
  ---------------------------------------   
  运行jsp报错信息:   
  javax.servlet.ServletException:   javax.servlet.jsp.JspException:   Unknown   property   'name'   
  org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)   
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)   
  org.apache.jsp.jsp.jstl_jsp._jspService(jstl_jsp.java:80)   
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)   
  javax.servlet.http.HttpServlet.service(HttpServlet.java:810)   
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)   
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)   
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)   
  javax.servlet.http.HttpServlet.service(HttpServlet.java:810)   
  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)   
    
    
  root   cause     
    
  java.lang.NoSuchMethodException:   Unknown   property   'name'   
  org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1175)   
  org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:772)   
  org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)   
  jsp.tag4.doEndTag(tag4.java:27)   
  org.apache.jsp.jsp.jstl_jsp._jspx_meth_gq_nestedout_0(jstl_jsp.java:134)   
  org.apache.jsp.jsp.jstl_jsp._jspx_meth_gq_with_0(jstl_jsp.java:107)   
  org.apache.jsp.jsp.jstl_jsp._jspService(jstl_jsp.java:71)   
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)   
  javax.servlet.http.HttpServlet.service(HttpServlet.java:810)   
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)   
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)   
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)   
  javax.servlet.http.HttpServlet.service(HttpServlet.java:810)   
  org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)   原因: ExpressionEvaluatorManager.evaluate( "value",   value.toString(), Object.class, this,  pageContext); 为什么总是返回的是String类型:
导致这种原因是  PropertyUtils.getProperty(parent.getValue(),   property);  用反射时parent.getValue()得到的是String类型,所以没有property的值。
请各位大哥帮帮忙!!!