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

Moderator: admin

Post Reply
ETS User

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

Post 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!

Guest

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

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests