You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Cobban <jc...@magma.ca> on 2002/11/19 15:20:34 UTC

Please respond, I am at a roadblock, Tomcat cannot find setter method

I have posted this and nobody has responded.

I have defined a custom tag with attributes "lang" which sets the human language of the response, and "maxRows" which sets the number of rows from the database response which will be displayed.  The problem is that Tomcat REFUSES to permit me to use those specific names.  Specifically it issues an error message saying that it is "unable to find the setter method".  If I rename them to something essentially equivalent, but meaningless to my users, the attributes are accepted.  But I do not see why I should force my users to enter meaningless strings of characters because Tomcat will not accept the two obvious names for these attributes.  I have searched the JSP 1.2 and Tomcat documentation exhaustively and I cannot find any documentation of restrictions on the naming of attributes.

Either show me the spot in the documentation where it says that I cannot use those attribute name or tell me how do I get Tomcat to recognize these attribute names.

Jim Cobban   jcobban@magma.ca
34 Palomino Dr.
Kanata, ON, CANADA
K2M 1M1
+1-613-592-9438

Re: Please respond, I am at a roadblock, Tomcat cannot find setter method

Posted by peter lin <pe...@labs.gte.com>.
looking at the source you posted, it looks like you're making it harder
on yourself than necessary.

Words like lang are commonly associated with java.lang in Java. maxRows
like wise is commonly used jdbc drivers, which introduces unnecessary
risk in the context of tags.  Does it work if you use the following?

language
maximumRows

if those work, why not use them?  afterall, it's more clear than just
lang or maxrows.

peter


Jim Cobban wrote:
> 
> ----- Original Message -----
> From: "peter lin" <pe...@labs.gte.com>
> Subject: Re: Please respond, I am at a roadblock, Tomcat cannot find setter
> method
> 
> > it would help to post actual examples,
> 
> I have already posted those examples in the posting "Unable to find setter
> method" which generated no response.  The problem is exactly as I have
> described it.  I just want to know what I have to do to convince Tomcat to
> accept those attribute names.
> 
> The tag appears in the JSP as:
> 
>  <census:subdivq lang="EN" maxRows="25">
> 
> If I change it to:
> 
>  <census:subdivq ling="EN" maxRoz="25">
> 
> (with corresponding changes to the names of the set methods and to the TLD)
> then it works.  But I do not reasonably feel that I can expect my users to
> understand the modified attribute names, and I do not understand why I
> should be forced to use meaningless attribute names in the absence of clear
> documentation that certain attribute names are reserved by the architecture.
> 
> I am frustrated because all I have received is confirmation that certain
> attribute names do not work and have to be replaced.  None of the threads in
> the archives which discuss this particular error message ever seemed to get
> to a resolution.  I do not understand why this behavior by Tomcat is
> tolerated.
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Please respond, I am at a roadblock, Tomcat cannot find setter method

Posted by Jim Cobban <jc...@magma.ca>.
----- Original Message -----
From: "peter lin" <pe...@labs.gte.com>
Subject: Re: Please respond, I am at a roadblock, Tomcat cannot find setter
method


> it would help to post actual examples,

I have already posted those examples in the posting "Unable to find setter
method" which generated no response.  The problem is exactly as I have
described it.  I just want to know what I have to do to convince Tomcat to
accept those attribute names.

The tag appears in the JSP as:

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

If I change it to:

 <census:subdivq ling="EN" maxRoz="25">

(with corresponding changes to the names of the set methods and to the TLD)
then it works.  But I do not reasonably feel that I can expect my users to
understand the modified attribute names, and I do not understand why I
should be forced to use meaningless attribute names in the absence of clear
documentation that certain attribute names are reserved by the architecture.

I am frustrated because all I have received is confirmation that certain
attribute names do not work and have to be replaced.  None of the threads in
the archives which discuss this particular error message ever seemed to get
to a resolution.  I do not understand why this behavior by Tomcat is
tolerated.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Please respond, I am at a roadblock, Tomcat cannot find setter method

Posted by peter lin <pe...@labs.gte.com>.
it would help to post actual examples, like how your using the tags you
created, what are the taglib declarations. the specific errors you are
getting.  it's understandable to be stressed, but without details, no
one is going to be able to help.

peter

Jim Cobban wrote:
> 
> I have posted this and nobody has responded.
> 
> I have defined a custom tag with attributes "lang" which sets the human language of the response, and "maxRows" which sets the number of rows from the database response which will be displayed.  The problem is that Tomcat REFUSES to permit me to use those specific names.  Specifically it issues an error message saying that it is "unable to find the setter method".  If I rename them to something essentially equivalent, but meaningless to my users, the attributes are accepted.  But I do not see why I should force my users to enter meaningless strings of characters because Tomcat will not accept the two obvious names for these attributes.  I have searched the JSP 1.2 and Tomcat documentation exhaustively and I cannot find any documentation of restrictions on the naming of attributes.
> 
> Either show me the spot in the documentation where it says that I cannot use those attribute name or tell me how do I get Tomcat to recognize these attribute names.
> 
> Jim Cobban   jcobban@magma.ca
> 34 Palomino Dr.
> Kanata, ON, CANADA
> K2M 1M1
> +1-613-592-9438

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>