I am really at a roadblock with this problem.  I cannot proceed until
someone tells me what I am doing wrong.

I have continued experimenting.  Even on 4.1.12 I definitely have the
problem that Tomcat cannot find the setLang method which is in the base
class unless I include that silly redirection routine in the derived class.
I know that this is not what is supposed to happen, but it is what is
happening.  The declarations of the two classes remain the same except that
I have commented out the set methods in the derived class.

Would someone please give me some ideas of how to proceed in resolving this
problem?

----- Original Message -----
From: "Jim Cobban" <[EMAIL PROTECTED]>
To: "Tomcat User Maillist" <[EMAIL PROTECTED]>
Sent: Saturday, November 16, 2002 12:02 PM
Subject: Unable to find setter method


I do not understand why I am getting this error message.

The line in the JSP is:

  <census:subdivq lang="EN" maxRows="999">

The definition of the tag in the TLD is:

  <tag>
    <name>subdivq</name>
    <tagclass>Census.tags.QuerySubDivTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <info>Performs a query of the census subdivision table based upon the
 parameters supplied in the request URL</info>
    <attribute>
      <!-- this attribute indicates the language to be used for text
    displayed to the user -->
      <name>lang</name>
      <required>false</required>
    </attribute>
    <attribute>
      <!-- this attribute indicates the maximum number of rows to
display -->
      <name>maxRows</name>
      <required>false</required>
    </attribute>
  </tag>

The class definition is:



public class QuerySubDivTag extends QueryTag
{

  public void setLang(String lang)
  {
    super.setLang(lang);
  }

  public void setMaxRows(String repeats)
  {
    super.setMaxRows(repeats);
  }

Tomcat 4.1.12 recognizes that the setLang method is present (although I had
to put in that pointless redirection to super to get it to do that) but not
the presence of the setMaxRows method.

The definition of the methods in the base class is:

  public void setLang(String lang)
  {
      if ((lang != null) && lang.equalsIgnoreCase("FR"))
 Language = FRENCH;
      else
 Language = ENGLISH;
  }  // LangTag.setLang

    public void setMaxRows(String repeats)
    {
 try
 {
     maxRows = Integer.parseInt(repeats);
 }
 catch(NumberFormatException nfe)
 {
     maxRows = 50;
 }
    }  // QueryTag.setMaxRows

Jim Cobban   [EMAIL PROTECTED]
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to