I'm trying to reconstruct this question in my project but I'm getting the following error:
org.apache.jasper.JasperException: /testTagLib.jsp(12,0) Attribute var invalid for tag advice according to TLD
Does anyone have an idea what I'm doing wrong?
this is the code:
in my tld:
Code: Select all
<tag>
<description>Random Advice</description>
<name>advice</name>
<tag-class>com.example.AdvisorTagHandler</tag-class>
<body-content>scriptless</body-content>
<attribute>
<name>user</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<variable>
<name-from-attribute>var</name-from-attribute>
<variable-class>java.lang.String</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
</variable>
</tag>
Code: Select all
<testTag:advice user="kevin" var='bla'>${bla}</testTag:advice>