wood burning stoves 2.0*
The moose likes JSP and the fly likes extending with SimpleTagSupport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "extending with SimpleTagSupport" Watch "extending with SimpleTagSupport" New topic
Author

extending with SimpleTagSupport

frank braunstein
Ranch Hand

Joined: Dec 17, 2009
Posts: 60
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

Joined: Jan 10, 2002
Posts: 60766
    
  65


Is this your actual code, or an overly-simplified example?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kris Schneider
Ranch Hand

Joined: Feb 14, 2001
Posts: 71
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

Joined: Dec 17, 2009
Posts: 60
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.
 
 
subject: extending with SimpleTagSupport
 
Similar Threads
Setting bean in Simple tag attribute
Creating and populating a List of javaBeans in a JSP w/o using scriptlets
List attribute on Simple Tag Handler
unable to initialize a list from custom simple tag handler
Doubt in HFSJ..pg 511 creating simple tag with attribute