This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSF and the fly likes Custom Tag won't display the attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Custom Tag won Watch "Custom Tag won New topic

Custom Tag won't display the attributes

Cori Eckel

Joined: Aug 18, 2006
Posts: 1
Quick summary: I can't refer to the attributes passed in to by custom tag.

I have a .jsf page that is passing two strings. One is from the backingBean and the other is hardcoded.

The --<hutputText value="#{item.title}"/>-- shows that I do have a value when call this custom tag with item.title passed as varid.

Now the tag looks like this: custom.tag located in /WEB-INF/tags/

I was told I needed to have an implicit.tld file and I read it also here (

So here's my implicit.tld (also located under /WEB-INF/tags/

So the problem is when I refer varid - I get nothing (nothing writes out in either case using outputText or just ${varid}).

And when I refer to hardid, I get nothing for the outputText test but I do get something for the ${hardid} test.

I don't see this a reference to this problem alot on the web so I figure I must be missing something obvious but I just don't know what.

Does anyone have any ideas?


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17148

I haven't looked lately, but I think you need to declare the attributes you're going to support. In other words, the example you used is a "do-nothing" skeleton that requires you to add stuff that makes it do something useful.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Custom Tag won't display the attributes
It's not a secret anymore!