tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vernon Wu <>
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) {

public class FullSearchListTag extends SearchListTag {
  public void setNumItems(String numItemsStr) {

I have tried to remove the setNumItems method from SearchList and/or   FullSearchList, but
can't resolute the problem. 
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.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message