• Post Reply Bookmark Topic Watch Topic
  • New Topic

to output the custom tag's attribute..

 
Stella Kim
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The custom tag 'test' is defined in TLD as
<body-content>empty</body-content>
.....
<attribute>
<name> symbol </name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
...

And the prefix for that tag is 'myTest'

In JSP that invokes a tag, how I can output the attribute value ?

The following is correct ?
<myTag:test symbol = "symbolValue" />
${symbolValue}

Or,
<myTag:test symbol = "symbolValue" >
${symbolValue}
</myTag:test>
is this correct ? (which I don't think..cause this tag is defined as a empty body in TLD)
 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<myTag:test symbol = "symbolValue" />
${symbolValue}


I think above is a correct one.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
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!