• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jsp:attribute - HFJ 472

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks,
i've a a tld where <body-content>scriptless</body-content>. So i can have any actions in my tag.

I used the tag in my jsp as given below
<SampleTag:HTag>
<jsp:attribute name="tstAttrib" value="tstValue"/>
</SampleTag:HTag>

As per the note given on the bottom of HFJPage 472 "<jsp:attribute> tag dont count as a 'body content" so the above code must compile. Unfortunately I am getting compiler error "Attribute tstAttrib invalid for tag HTag according to TLD"

Can any of you please help me to sort out what went wrong?
[ November 29, 2007: Message edited by: Sandeep Krish ]
 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<jsp:attribute> do not have an attribute called value give the value in the body of jsp:attribute .....
<jsp:attribute name="user">${param.username}</jsp:attribute>

jsp:attribute attributes are name,trim. there is no value attribute in it.
 
Sandeep Krish
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply. I corrected the mistake. Still i get the same exception.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you declare you tag in the TLD. Did you declare an attribute called "tstAttrib" ?
 
Hang a left on main. Then read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic