Page 1 of 1

About Question com.enthuware.ets.scwcd.v5.2.228 :

Posted: Wed Oct 12, 2011 7:28 am
by ETS User
Hi,

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>
in my jsp:

Code: Select all

<testTag:advice user="kevin" var='bla'>${bla}</testTag:advice>
Thanks in advance!

Re: About Question com.enthuware.ets.scwcd.v5.2.228 :

Posted: Sat Oct 15, 2011 10:02 am
by Guest
I am not sure if this is related to this forum but anyway ... a have never used tag variables but as the error suggests such attribute called var is not defined, so probably if you want to use variables - this particular attribute has to be defined.

This is just my suggestion, so better to check it in JSP Specification.