Have you defined the methods "public void setName(String)"
and "public void setType(String)" ?
--
Peter Pilgrim
"Putting PLEASE HELP ME! URGENT HELP! in the E-Mail Subject: Line,
will probably lead to the opposite intention." << The Windows Trash Can >>
************* HOLIDAY WARNING 16th July to 28 July *************************
---------------------------------------- Message History
----------------------------------------
From: cbarnes <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 13/07/2001 17:00 CET
--<CU&T>--
I want to be able to create a variable in a custom tag and make this
variable available in the JSP the tag was called from.
To do this I added the following line to the doStartTag (or doEndTag) method
in the custom tag.
pageContext.setAttribute("myvariable", myvariable,
PageContext.APPLICATION_SCOPE);
I then created a TagExtraInfo class that looked similar to the following
(this class was added to the tld file):
public class myTEI extends TagExtraInfo
{
public VariableInfo[] getVariableInfo(TagData data)
{
String name = data.getAttributeString("name");
String type = data.getAttributeString("type);
VariableInfo[] scriptvars = new VariableInfo[1];
scriptvars[0] = new
VariableInfo(name,type,true,VariableInfo.AT_BEGIN);
return scriptvars;
}
}
The problem with this is that in getVariableInfo the values of name and
type are null.
Can anyone tell me if the problem is with the line of code where I add the
variable to the pageContext or with the TEI class and how I can fix this?
Thanks,
Catharine
--<CUT>--
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorised copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
===========================================================================
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://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets