tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vernon Wu <vern...@gatewaytech.com>
Subject Unable to find setter: a problem with custom tag in TC 4.0.4b2
Date Thu, 30 May 2002 03:04:57 GMT
Hi, all,

I run into an error message on Tomcat 4.0.4b2 when I use a custom tag in a JSP   file. The
error message is:

/jsp/fullsearchlist/content.jsp(4,0) Unable to find setter method for attribute:   numItems

The code fragment is  the followings:

public abstract class ListTag extends TagSupport {
	// ...
  protected int numItems = -1;
	//...

  // setters
  public void setNumItems(String numItemsStr) {
    numItems = Integer.parseInt(numItemsStr);
  }
}

public abstract class SearchListTag extends ListTag {
	//...
  // setters (overloaded to fix bug in tomcat)
  public void setNumItems(String numItemsStr) {
    super.setNumItems(numItemsStr);
  }
}

public class FullSearchListTag extends SearchListTag {
	//...
  public void setNumItems(String numItemsStr) {
    super.setNumItems(numItemsStr);
  }
}

I have tried to remove the setNumItems method from SearchList and/or   FullSearchList, but
can't resolute the problem. 
I
learn that there was a bug led to this problem in the early version of Tomcat. Is   the bug
unresolved yet? How I can
overcome this problem?

Thanks very much in advance.

Vernon



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message