This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes Question about TLD and variable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Question about TLD and variable" Watch "Question about TLD and variable" New topic
Author

Question about TLD and variable

Oliver Rensen
Ranch Hand

Joined: Jul 23, 2004
Posts: 109

Hello ranchers,

when I declare an attribute and a variable within the TLD like followed:

<tag>
<attribute>
<name>testname</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>

<variable>
<name-from-attribute>testname</name-from-attribute>
<scope>AT_BEGIN</scope>
</variable>
</tag>

How can I access the variable testname in the JSP?

Only by EL or only by scriptlets?

<my:variableTest testname="howToCallThis"/>

${howToCallThis}
or
<%= howToCallThis %>

Regards
Oliver
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question about TLD and variable
 
Similar Threads
runtime expression ${mode} is not working
Problem while Tag lib Up gradation
tag file example
custom tag and getAttribute
how comws varaible in the tag