That's because it's a JSP include, not a tile. JSP knows nothing about the tile scope and since the inclusion gets done by the JSP processor, not the tiles plugin, the tile variables aren't available. Make that a tile instead and you shouldn't have a problem. (*Chris*)
On 10/4/06, Vinod Kumar <[EMAIL PROTECTED]> wrote:
Hi All, I have included printable.jsp page in the layout-tiles file. I have some jsp variables (such as href, onchange etc see below in file) in printable.jsp, which i want to use inside tiles such as top.jsp, bottom.jsp but i cannot use those variables as they are not available. I get some undefined variable message. This may be more of scope issue but I don't know, how to get these variables accessible inside tiles. Thanks for the help. ***********start of layout-tiles.jsp************** <html:html> <head> <title><tiles:insert attribute="title"/></title> <%@ include file="include/printable.jsp" %> <tiles:insert attribute="head"/> </head> <body> <tiles:insert attribute="top"/> <tiles:insert attribute="content"/> <tiles:insert attribute="bottom"/> </body> </html:html> **********end of layout-tiles.jsp**************** ***start of printable.jsp (under include directory) ********* <% String printParm = (String)request.getAttribute("print"); boolean printThis = ( printParm != null && printParm.equals( "1" )); String href = ( printThis ? "nohref" : "href" ); String onchange = ( printThis ? "noonchange" : "onchange" ); String onblur = ( printThis ? "nonblur" : "onblur" ); %> ***end of printable.jsp ************** __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]