I am writing a custom tag that takes an attribute 'myattribute'. The custom
tag changes this value and I want to return the new value to the JSP page.
My tag library descriptor file contains the following entries:
<tagclass>tagclassname</tagclass>
<teiclass>teiclassname</teiclass>
The custom tag is used in the JSP as follows:
<myprefix:mytag myattribute=value/>
In the Tag class the doStartTag method ends with:
pageContext.setAttribute("myattribute", value);
The getVariableInfo method in the TEI class is as follows:
public VariableInfo[] getVariableInfo(TagData data)
{
VariableInfo[] info = new VariableInfo[1];
info[0] = new VariableInfo("myattribute", "String", false,
VariableInfo.AT_BEGIN);
return info;
}
When I run this the getVariableInfo method is not called and the new value
is not available in the JSP.
I have looked through the archives for this group. There was a similar
question a while back and the only response suggested changing the scope to
NESTED but this doesn't have any effect.
Can anyone tell me where I am going wrong?
Thanks,
Catharine
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com