This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
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
 
Consider Paul's rocket mass heater.
 
subject: Question about TLD and variable
 
Similar Threads
tag file example
Problem while Tag lib Up gradation
how comws varaible in the tag
runtime expression ${mode} is not working
custom tag and getAttribute