Hi all,
I think I am missing something and was wondering if anyone could offer some light on this subject. Whenever I have a
java object in a Tag class that I want to make available to the
JSP page, such as a
String called userName, I add a line to my doEndTag method which says something like :
pageContext.setAttribute("userName",userName);
and I add a class that extends TagExtraInfo and override the getVariableInfo method with a method that will contain a line something like:
VariableInfo info1 = new VariableInfo( "userName", "String", true, VariableInfo.AT_END);
and finally update the tld with the specified TEI.
The question is why is it necessary to do all of these things? What are the advantages to this versus just setting the attribute in the doEndTag method like:
pageContext.setAttribute("userName",userName, PAGE_SCOPE);
?
Thanks in advance for clarifying the subtle or not so subtle differences in these methodologies.
-MLA