i want to use a boolean attribute , which i set in a tag file A inside another tag file B which is nested in A, i tried doing this by jspContext.setAttribute("header",new Boolean("true"), PageContext.PAGE_SCOPE); in tag File A, then using jspContext.getAttribute("header",PageContext.PAGE_SCOPE); in tag file B. but this isnt helping at all! any suggestions?
if you use this page attribute in tag file A <%@variable name-given="header" variable-class="java.lang.Boolean" scope="AT_BEGIN"%> then set the attribute like you are doing in Tag file A.
Yu will be able to get it in Tag file B.
By the way if i were you i would avoid the use of scriptlets.
SCJP 1.4, SCWCD 1.4
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999
Joined: Feb 02, 2006
so there is a better way to do this then? would be gr8 if you'd share your idea!
subject: how to make a variable available across tag files?