• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:attibute

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:attribute> : There is a staetment on HFJS page 593,Q7,E)
You are allowed to use this action with dynamic tags.
What do dynamic tags mean?

Where else can I use jsp:attribute other than for body of a custom tag with body-conent set to be empty?
 
Chinmaya Chowdary
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Amarkirt. If our tag handler class implements DynamicAttributes interface, then we can add attributes dynmically. There is no need to put <attribute>...</attribute> in the tld file, and we don't need to write attribute methods (like setAddMethod().. in our tag handler class).

<jsp:attribute> will not constitute the body of the tag. It must be placed inside the tag. We can't use it alone. With <jsp:attribute> we can set the attribute to the tag.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!