Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

extending with SimpleTagSupport

 
frank braunstein
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Although i have written a bean-style setter method for an JSTL-custom-Tag attribute. I am not able to actually use the custom tag, because the Web-container (Tomcat 6 b.t.w) says:"Cannot find a setter method for the attribute movieList in class XYZ". The problem is: Im pretty sure that i HAVE written a setter-method for that attribute, as you can probably make out here:

The Tag-Handler-class:


and respective parts of the TLD-file:



All other Tags, 5 in a row, deployed in the same TLD DO WORK, im able to write in my JSP things like:

but this one does not compile, regardless of what is passed as the attribute value, im given the straight error: "Cannot find a setter method for the attribute movieList of the tag handler com.domain.SimpleTagTest5"

Help please.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Is this your actual code, or an overly-simplified example?
 
Kris Schneider
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure the attribute TLD element correctly reflects your tag's movieList property. Then think about why Bear would ask that question .
 
frank braunstein
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
Is this your actual code, or an overly-simplified example?


that is an overly-simplified example. of course there are all necessary page and taglib imports done.

EDIT:

I dont know exactly why, but the tag does work correctly now. I did nothing special, its like a miracle. I did not apply any programmatic change at all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic