• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to find setter method for attribute:

 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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



?
 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep ! That fixed it. I was confusing it by capitilizing my attribute names instead of going the traditional route.

Thanks for you help !!

S
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic