wood burning stoves*
The moose likes JSP and the fly likes Unable to find setter method for attribute: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Unable to find setter method for attribute:" Watch "Unable to find setter method for attribute:" New topic
Author

Unable to find setter method for attribute:

Sylvia H Charbonneau
Ranch Hand

Joined: Jul 11, 2002
Posts: 37
Good Morning,

I've got a JSP page, implementing a tag library using Tomcat 4.1.18. I've defined the attribute in the TLD:
<tag> ....
<attribute>
<name>OrgID</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>


and I have defined the setter method in my code:

public void setOrgID( int pOrgID ) {


The funny thing is the 3 required attributes used in my JSP work. But, they are all strings - does this make a difference ? All the documentation I've read says no. But, the attributes after that do not work.

Am I perhaps missing a step ?

Thank you !!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

A couple of things:

1) Conventionally, the attribute should be orgID as opposed to OrgID.

2) How are you invoking the tag? When you use



"123" is a String, not an integer. Or are you doing something like



?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sylvia H Charbonneau
Ranch Hand

Joined: Jul 11, 2002
Posts: 37
Yep ! That fixed it. I was confusing it by capitilizing my attribute names instead of going the traditional route.

Thanks for you help !!

S
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to find setter method for attribute:
 
Similar Threads
Tag Attributes
Enumeration of values for an attribute for a custom tag?
Passing ArrayList to JSP custom Tag?
displat:table tag pls help me
setters and getters for field in customTag question