This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
You may need to access some values set in a tag, and to do so you can use the "variable" tag. The "declare" attribute will force the container to declare a new variable in the calling page, so that the page can access the value set in the tag. "declare" defaults to true. If "declare" is set to false, the variable will not be declared by the container, so it is assumed that the variable already exists in the calling page.
For example (using the variable directive of a Tag File), the following tag will force the container to declare a new variable (java.lang.String extVar ;) in the JSP calling the tag, just before the tag is being used :
If the declare was set to false, this variable would not be declared, assuming there's already an existing variable of the same name. [ July 28, 2008: Message edited by: Christophe Verre ]