tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Heinemann <heine...@horacemann.com>
Subject javax.servlet.jsp.tagext.TagAttributeInfo: method (Ljava/lang/String;ZLjava/lang/String;Z)V not found
Date Mon, 17 Jul 2000 13:42:11 GMT
I am trying to create a custom tag.  It worked fine before I tried to
have an attribute.  I even get this on the example taglibs.  Is this a
common problem or have I configured things wrong.  I don't think I have
done things wrong because it worked great before I had an attribute.

Here is the JSP file:
<%@ taglib uri="/hmtags" prefix="hm" %>
     <HTML>
          <HEAD>
               <TITLE>Hello World!</TITLE>
          </HEAD>
          <BODY BGCOLOR="#FFFFFF">
               <HR>
               <hm:Group name="chris"  />
               <HR>
          </BODY>
     </HTML>

Here is my class:
package com.hm.tags;

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class Group implements Tag {

    private PageContext pageContext;
    private Tag parent;
    private String name = "World";  //default value


    public int doStartTag() throws javax.servlet.jsp.JspException
    {
 return EVAL_BODY_INCLUDE;
    }

    public void setName (String name){
 this.name = name;
    }

    public int doEndTag() throws javax.servlet.jsp.JspException
    {
 try
     {
  StringBuffer buff = new StringBuffer();

  buff.append ("Hello "+name);

  pageContext.getOut().write(buff.toString());
     }
 catch(java.io.IOException e)
     {
  throw new JspException("IO Error: " + e.getMessage());
     }
 return EVAL_PAGE;
    }

    public void release() {}

    public void setPageContext(final javax.servlet.jsp.PageContext
pageContext)
    {
 this.pageContext=pageContext;
    }
    public void setParent(final javax.servlet.jsp.tagext.Tag parent)
    {
 this.parent=parent;
    }


    public javax.servlet.jsp.tagext.Tag getParent()
    {
 return parent;
    }

}


here is my taglib tld
<taglib>
               <tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
               <shortname>hm</shortname>
               <uri>/hmtags</uri>
               <info>My first Tag library</info>

 <tag>
            <name>Group</name> <tagclass>com.hm.tags.Group</tagclass>
            <bodycontent>empty</bodycontent>
            <info>A Hello World tag</info>
 <attribute>
               <name>name</name>
               <required>false</required>
          </attribute>
        </tag>

</taglib>

Thanks,
Chris


Mime
View raw message