Then you should be able to go to the outermost tile and use
<tiles:importAttribute scope="request"/> after you've imported the tiles
taglib and all the tile variables to be available to the jsp and jstl tags.
 (*Chris*)

On 10/4/06, Vinod Kumar <[EMAIL PROTECTED]> wrote:

Hi Chris,
Thanks for your quick response. I could not make it
to work. sorry, I am new to this stuff. In which tile
should I include <tils:importAttribite/> ? I want to
import all the variables available in tile
"printable.jsp" and put them in request scope, so that
I can use them in all of the tiles.

Thanks
Vinod

--- Chris Pratt <[EMAIL PROTECTED]> wrote:

> If they are tile scope variables, you either need to
> put
> <tiles:importAttribute/> at the top of the page to
> put them in page scope or
> use the tiles tags to insert the values (like
> <tiles:getAsString
> name="href"/>)
>   (*Chris*)
>
> On 10/4/06, Vinod Kumar <[EMAIL PROTECTED]> wrote:
> >
> > Hi Chris,
> >     I made the printable.jsp page as a tile and
> > included it in the layout-tiles.jsp page. But
> still I
> > can't access the variables declared in tile
> > "printable" in another tile.
> >
> > I try to access the href variable like
> > <a <%= href %> = "contact.jsp">This is link</a>
> >
> > but I get Undefined variable: href
> > out.print( href );
> >
> > Thanks
> > Vinod
> >
> >
> > --- Chris Pratt <[EMAIL PROTECTED]> wrote:
> >
> > > 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]
> > > >
> > > >
> > >
> >
> >
> > __________________________________________________
> > 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]
> >
> >
>


__________________________________________________
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]


Reply via email to