You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gaurav Saxena <gs...@sapient.com> on 2001/11/19 12:51:11 UTC

Problem with Custom Tag Attribute : Is this case-sensitive in Tomcat 4.0.1?

Hi,

I have a custom Tag defined in my "tld" file with an attribute named as
"class" as follows:

...
<attribute>
   <name>class</name>
   <required>false</required>
</attribute>

Correspondingly, I have defined a method "setClass(...)" in my Tag
implementation class.

Now the problem is this: If I use all lowercase name "class" in my JSP and
tld, I get the following exception on Tomcat 4.0.1:

        org.apache.jasper.compiler.CompileException: /<myPage.jsp> Unable to
find setter method for attribute: class

The same setup work fine on Weblogic 6.0 but I get the above exception on
Tomcat 4.0.1. However, if I change the name of my attribute to "Class" both
in my JSP and tld files on Tomcat, everything works fine. So my question is:
Is Tag attribute name case-sensitive (i.e. same case on JSP, tld, and Set...
method in Tag implementation class). If yes, is Weblogic forgiving in
ignoring such mistakes? Is there any way so that Tomcat may ignore the
case-sensitiveness just like Weblogic?

--GS