You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Reynolds <ji...@gmail.com> on 2007/08/11 01:26:15 UTC

Struts tile and other tag includes

Struts 1.29 app that uses tiles definitions. Question is: I am finding
myself having to call the  taglib in the layout, and also in each
tile. If I take the taglib out of any of the jsp pages that is a tile,
then the page fails to display because it cannot find the taglib from
the template layout.

Is this the correct behavior, or is there any way to only include
needed taglib (html, bean, tiles, etc) only once somewhere?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] Re: Struts tile and other tag includes

Posted by Rod Bollinger <te...@portablegenius.com>.
I think you are still confused at what is being proposed. No one is
advocating the inclusion of any "libs" anywhere or adding a bunch of
includes in a JSP.

The proposal is to create a JSP that contains a set of <%@ taglib ... %>
directives. This, in itself, does not do anything but define a set of
locations. In your JSPs you use the <%@ include ... %> directive to include
that "location definition" fragment into the final page.

This is no different than composing pages containing other components - just
this particular page (component) contains location information. No "libs"
are being included.

This is not a "dirty" practice and is, in fact, the intention of the
specification.

-Rod Bollinger

-----Original Message-----
From: Yayo [mailto:eduyayo@gmail.com] 
Sent: Sunday, August 12, 2007 15:50
To: Struts Users Mailing List
Subject: Re: [OT] Re: Struts tile and other tag includes

'vew learned and (used to it) that we must not use the include directive
because it's a dirt practice, it's like separating c or cpp code in function
files and compose them with #include precompiler directive.

Also if you put all your inludes in one jsp you'll be adding unused libs to
your final pages and the environment editors should spite you warnings and
errors (if any editor warns about this)

I think we must not use the include directive for such a dirty job ^g^!

On 8/12/07, Rod Bollinger <te...@portablegenius.com> wrote:
>
>
> Perhaps you are referring to the use of scriptlets being discouraged (with
> which I agree). However, <%@ include ... %> is a JSP "directive", not
> scriptlet code and is in no way deprecated or discouraged.
>
> The following excerpt is from the JSP 2.1 specification (the latest
> version
> of JSP):
>
> <blockquote>
> JSP.1.10.3 The include Directive
>
>         The include directive is used to substitute text and/or code at
> JSP
> page translation-time. The <%@ include file="relativeURLspec" %> directive
> inserts the text of the specified resource into the page or tag file. The
> included file is subject to the access control available to the JSP
> container. The file attribute is as in Section JSP.1.2.1.
>         With respect to the standard and XML syntaxes, a file included via
> the include directive can use either the same syntax as the including
> page,
> or a different syntax. the semantics for mixed syntax includes are
> described
> in Section JSP.1.10.5.
>         A JSP container can include a mechanism for being notified if an
> included file changes, so the container can recompile the JSP page.
> However,
> the JSP 2.1 specification does not have a way of directing the JSP
> container
> that included files have changed.
>         The <jsp:directive.include> element (Section JSP.6.3.5, "The
> jsp:directive.include Element") describes the same information following
> the
> XML syntax.
>
> Examples
>
> The following example requests the inclusion, at translation time, of a
> copyright file. The file may have elements which will be processed too.
>
> <%@ include file="copyright.html" %>
>
> Syntax
>
> <%@ include file="relativeURLspec" %>
> </blockquote>
>
> The solution advised by Martin is indeed the proper way to address the
> issue
> at hand and personally has been proven to be a very effective approach in
> several large-scale, mission critical enterprise application projects
> where
> Struts, Tiles, JSTL, and other custom tag libraries were in use.
>
> Adding a single include directive (instead of a dozen or more) to each of
> several hundred JSPs is a much cleaner and more maintainable solution.
>
> I highly recommend reading (or re-reading) the JSP 2.1 specification -
> especially section JSP.1.10.5 (including data in JSP pages) for more
> information.
>
> Regards,
> -Rod Bollinger
>
>
> -----Original Message-----
> From: Yayo [mailto:eduyayo@gmail.com]
> Sent: Sunday, August 12, 2007 14:23
> To: Struts Users Mailing List
> Subject: Re: [OT] Re: Struts tile and other tag includes
>
> ld use the word "discouraged" ^g^
>
> On 8/12/07, Yayo <ed...@gmail.com> wrote:
> >
> > yeah, I know, but we can use cobol to program cgi instead of java too
> >
> > On 8/12/07, Dave Newton <newton.dave@yahoo.com > wrote:
> > >
> > > Then how do you figure it's been deprecated? It's the
> > > only thing that will allow doing what the original
> > > post was talking about.
> > >
> > > --- Yayo <ed...@gmail.com> wrote:
> > >
> > > > I know!
> > > >
> > > > On 8/12/07, Dave Newton <newton.dave@yahoo.com >
> > > > wrote:
> > > > >
> > > > > --- Yayo <ed...@gmail.com> wrote:
> > > > > > think that's a bad solution, the <include> has
> > > > been
> > > > > > deprecated by the use of tiles and the like to
> > > > > > compose pages... and even with that I don't
> > > > think
> > > > > > it will work...
> > > > >
> > > > > <%@ include ...%> is a directive; the file is
> > > > inserted
> > > > > at compile, not run, time.
> > > > >
> > > > > d.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
>
>
____________________________________________________________________________
> ________Ready
> > >
> > > > > for the edge of your seat?
> > > > > Check out tonight's top picks on Yahoo! TV.
> > > > > http://tv.yahoo.com/
> > > > >
> > > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail:
> > > > user-help@struts.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > "Nada fija tan intensamente una cosa a la memoria
> > > > como el deseo de
> > > > olvidarla." (Michel de Montaigne)
> > > >
> > > > http://yayocaturas.blogspot.com/
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
>
>
____________________________________________________________________________
> ________
> > > Sick sense of humor? Visit Yahoo! TV's
> > > Comedy with an Edge to see what's on, when.
> > > http://tv.yahoo.com/collections/222
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > "Nada fija tan intensamente una cosa a la memoria como el deseo de
> > olvidarla." (Michel de Montaigne)
> >
> > http://yayocaturas.blogspot.com/
> >
>
>
>
> --
> "Nada fija tan intensamente una cosa a la memoria como el deseo de
> olvidarla." (Michel de Montaigne)
>
> http://yayocaturas.blogspot.com/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Re: Struts tile and other tag includes

Posted by Yayo <ed...@gmail.com>.
'vew learned and (used to it) that we must not use the include directive
because it's a dirt practice, it's like separating c or cpp code in function
files and compose them with #include precompiler directive.

Also if you put all your inludes in one jsp you'll be adding unused libs to
your final pages and the environment editors should spite you warnings and
errors (if any editor warns about this)

I think we must not use the include directive for such a dirty job ^g^!

On 8/12/07, Rod Bollinger <te...@portablegenius.com> wrote:
>
>
> Perhaps you are referring to the use of scriptlets being discouraged (with
> which I agree). However, <%@ include ... %> is a JSP "directive", not
> scriptlet code and is in no way deprecated or discouraged.
>
> The following excerpt is from the JSP 2.1 specification (the latest
> version
> of JSP):
>
> <blockquote>
> JSP.1.10.3 The include Directive
>
>         The include directive is used to substitute text and/or code at
> JSP
> page translation-time. The <%@ include file="relativeURLspec" %> directive
> inserts the text of the specified resource into the page or tag file. The
> included file is subject to the access control available to the JSP
> container. The file attribute is as in Section JSP.1.2.1.
>         With respect to the standard and XML syntaxes, a file included via
> the include directive can use either the same syntax as the including
> page,
> or a different syntax. the semantics for mixed syntax includes are
> described
> in Section JSP.1.10.5.
>         A JSP container can include a mechanism for being notified if an
> included file changes, so the container can recompile the JSP page.
> However,
> the JSP 2.1 specification does not have a way of directing the JSP
> container
> that included files have changed.
>         The <jsp:directive.include> element (Section JSP.6.3.5, "The
> jsp:directive.include Element") describes the same information following
> the
> XML syntax.
>
> Examples
>
> The following example requests the inclusion, at translation time, of a
> copyright file. The file may have elements which will be processed too.
>
> <%@ include file="copyright.html" %>
>
> Syntax
>
> <%@ include file="relativeURLspec" %>
> </blockquote>
>
> The solution advised by Martin is indeed the proper way to address the
> issue
> at hand and personally has been proven to be a very effective approach in
> several large-scale, mission critical enterprise application projects
> where
> Struts, Tiles, JSTL, and other custom tag libraries were in use.
>
> Adding a single include directive (instead of a dozen or more) to each of
> several hundred JSPs is a much cleaner and more maintainable solution.
>
> I highly recommend reading (or re-reading) the JSP 2.1 specification -
> especially section JSP.1.10.5 (including data in JSP pages) for more
> information.
>
> Regards,
> -Rod Bollinger
>
>
> -----Original Message-----
> From: Yayo [mailto:eduyayo@gmail.com]
> Sent: Sunday, August 12, 2007 14:23
> To: Struts Users Mailing List
> Subject: Re: [OT] Re: Struts tile and other tag includes
>
> ld use the word "discouraged" ^g^
>
> On 8/12/07, Yayo <ed...@gmail.com> wrote:
> >
> > yeah, I know, but we can use cobol to program cgi instead of java too
> >
> > On 8/12/07, Dave Newton <newton.dave@yahoo.com > wrote:
> > >
> > > Then how do you figure it's been deprecated? It's the
> > > only thing that will allow doing what the original
> > > post was talking about.
> > >
> > > --- Yayo <ed...@gmail.com> wrote:
> > >
> > > > I know!
> > > >
> > > > On 8/12/07, Dave Newton <newton.dave@yahoo.com >
> > > > wrote:
> > > > >
> > > > > --- Yayo <ed...@gmail.com> wrote:
> > > > > > think that's a bad solution, the <include> has
> > > > been
> > > > > > deprecated by the use of tiles and the like to
> > > > > > compose pages... and even with that I don't
> > > > think
> > > > > > it will work...
> > > > >
> > > > > <%@ include ...%> is a directive; the file is
> > > > inserted
> > > > > at compile, not run, time.
> > > > >
> > > > > d.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
>
> ____________________________________________________________________________
> ________Ready
> > >
> > > > > for the edge of your seat?
> > > > > Check out tonight's top picks on Yahoo! TV.
> > > > > http://tv.yahoo.com/
> > > > >
> > > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail:
> > > > user-help@struts.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > "Nada fija tan intensamente una cosa a la memoria
> > > > como el deseo de
> > > > olvidarla." (Michel de Montaigne)
> > > >
> > > > http://yayocaturas.blogspot.com/
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
>
> ____________________________________________________________________________
> ________
> > > Sick sense of humor? Visit Yahoo! TV's
> > > Comedy with an Edge to see what's on, when.
> > > http://tv.yahoo.com/collections/222
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > "Nada fija tan intensamente una cosa a la memoria como el deseo de
> > olvidarla." (Michel de Montaigne)
> >
> > http://yayocaturas.blogspot.com/
> >
>
>
>
> --
> "Nada fija tan intensamente una cosa a la memoria como el deseo de
> olvidarla." (Michel de Montaigne)
>
> http://yayocaturas.blogspot.com/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/

RE: [OT] Re: Struts tile and other tag includes

Posted by Rod Bollinger <te...@portablegenius.com>.
Perhaps you are referring to the use of scriptlets being discouraged (with
which I agree). However, <%@ include ... %> is a JSP "directive", not
scriptlet code and is in no way deprecated or discouraged.

The following excerpt is from the JSP 2.1 specification (the latest version
of JSP):

<blockquote>
JSP.1.10.3 The include Directive

	The include directive is used to substitute text and/or code at JSP
page translation-time. The <%@ include file="relativeURLspec" %> directive
inserts the text of the specified resource into the page or tag file. The
included file is subject to the access control available to the JSP
container. The file attribute is as in Section JSP.1.2.1. 
	With respect to the standard and XML syntaxes, a file included via
the include directive can use either the same syntax as the including page,
or a different syntax. the semantics for mixed syntax includes are described
in Section JSP.1.10.5.
	A JSP container can include a mechanism for being notified if an
included file changes, so the container can recompile the JSP page. However,
the JSP 2.1 specification does not have a way of directing the JSP container
that included files have changed.
	The <jsp:directive.include> element (Section JSP.6.3.5, "The
jsp:directive.include Element") describes the same information following the
XML syntax.

Examples

The following example requests the inclusion, at translation time, of a
copyright file. The file may have elements which will be processed too.

<%@ include file="copyright.html" %>

Syntax

<%@ include file="relativeURLspec" %>
</blockquote>

The solution advised by Martin is indeed the proper way to address the issue
at hand and personally has been proven to be a very effective approach in
several large-scale, mission critical enterprise application projects where
Struts, Tiles, JSTL, and other custom tag libraries were in use. 

Adding a single include directive (instead of a dozen or more) to each of
several hundred JSPs is a much cleaner and more maintainable solution.

I highly recommend reading (or re-reading) the JSP 2.1 specification -
especially section JSP.1.10.5 (including data in JSP pages) for more
information.

Regards,
-Rod Bollinger


-----Original Message-----
From: Yayo [mailto:eduyayo@gmail.com] 
Sent: Sunday, August 12, 2007 14:23
To: Struts Users Mailing List
Subject: Re: [OT] Re: Struts tile and other tag includes

ld use the word "discouraged" ^g^

On 8/12/07, Yayo <ed...@gmail.com> wrote:
>
> yeah, I know, but we can use cobol to program cgi instead of java too
>
> On 8/12/07, Dave Newton <newton.dave@yahoo.com > wrote:
> >
> > Then how do you figure it's been deprecated? It's the
> > only thing that will allow doing what the original
> > post was talking about.
> >
> > --- Yayo <ed...@gmail.com> wrote:
> >
> > > I know!
> > >
> > > On 8/12/07, Dave Newton <newton.dave@yahoo.com >
> > > wrote:
> > > >
> > > > --- Yayo <ed...@gmail.com> wrote:
> > > > > think that's a bad solution, the <include> has
> > > been
> > > > > deprecated by the use of tiles and the like to
> > > > > compose pages... and even with that I don't
> > > think
> > > > > it will work...
> > > >
> > > > <%@ include ...%> is a directive; the file is
> > > inserted
> > > > at compile, not run, time.
> > > >
> > > > d.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
____________________________________________________________________________
________Ready
> >
> > > > for the edge of your seat?
> > > > Check out tonight's top picks on Yahoo! TV.
> > > > http://tv.yahoo.com/
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > "Nada fija tan intensamente una cosa a la memoria
> > > como el deseo de
> > > olvidarla." (Michel de Montaigne)
> > >
> > > http://yayocaturas.blogspot.com/
> > >
> >
> >
> >
> >
> >
> >
____________________________________________________________________________
________
> > Sick sense of humor? Visit Yahoo! TV's
> > Comedy with an Edge to see what's on, when.
> > http://tv.yahoo.com/collections/222
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Nada fija tan intensamente una cosa a la memoria como el deseo de
> olvidarla." (Michel de Montaigne)
>
> http://yayocaturas.blogspot.com/
>



-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Re: Struts tile and other tag includes

Posted by Yayo <ed...@gmail.com>.
ld use the word "discouraged" ^g^

On 8/12/07, Yayo <ed...@gmail.com> wrote:
>
> yeah, I know, but we can use cobol to program cgi instead of java too
>
> On 8/12/07, Dave Newton <newton.dave@yahoo.com > wrote:
> >
> > Then how do you figure it's been deprecated? It's the
> > only thing that will allow doing what the original
> > post was talking about.
> >
> > --- Yayo <ed...@gmail.com> wrote:
> >
> > > I know!
> > >
> > > On 8/12/07, Dave Newton <newton.dave@yahoo.com >
> > > wrote:
> > > >
> > > > --- Yayo <ed...@gmail.com> wrote:
> > > > > think that's a bad solution, the <include> has
> > > been
> > > > > deprecated by the use of tiles and the like to
> > > > > compose pages... and even with that I don't
> > > think
> > > > > it will work...
> > > >
> > > > <%@ include ...%> is a directive; the file is
> > > inserted
> > > > at compile, not run, time.
> > > >
> > > > d.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > ____________________________________________________________________________________Ready
> >
> > > > for the edge of your seat?
> > > > Check out tonight's top picks on Yahoo! TV.
> > > > http://tv.yahoo.com/
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > "Nada fija tan intensamente una cosa a la memoria
> > > como el deseo de
> > > olvidarla." (Michel de Montaigne)
> > >
> > > http://yayocaturas.blogspot.com/
> > >
> >
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Sick sense of humor? Visit Yahoo! TV's
> > Comedy with an Edge to see what's on, when.
> > http://tv.yahoo.com/collections/222
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Nada fija tan intensamente una cosa a la memoria como el deseo de
> olvidarla." (Michel de Montaigne)
>
> http://yayocaturas.blogspot.com/
>



-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/

Re: [OT] Re: Struts tile and other tag includes

Posted by Yayo <ed...@gmail.com>.
yeah, I know, but we can use cobol to program cgi instead of java too

On 8/12/07, Dave Newton <ne...@yahoo.com> wrote:
>
> Then how do you figure it's been deprecated? It's the
> only thing that will allow doing what the original
> post was talking about.
>
> --- Yayo <ed...@gmail.com> wrote:
>
> > I know!
> >
> > On 8/12/07, Dave Newton <ne...@yahoo.com>
> > wrote:
> > >
> > > --- Yayo <ed...@gmail.com> wrote:
> > > > think that's a bad solution, the <include> has
> > been
> > > > deprecated by the use of tiles and the like to
> > > > compose pages... and even with that I don't
> > think
> > > > it will work...
> > >
> > > <%@ include ...%> is a directive; the file is
> > inserted
> > > at compile, not run, time.
> > >
> > > d.
> > >
> > >
> > >
> > >
> > >
> >
>
> ____________________________________________________________________________________Ready
> > > for the edge of your seat?
> > > Check out tonight's top picks on Yahoo! TV.
> > > http://tv.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > "Nada fija tan intensamente una cosa a la memoria
> > como el deseo de
> > olvidarla." (Michel de Montaigne)
> >
> > http://yayocaturas.blogspot.com/
> >
>
>
>
>
>
> ____________________________________________________________________________________
> Sick sense of humor? Visit Yahoo! TV's
> Comedy with an Edge to see what's on, when.
> http://tv.yahoo.com/collections/222
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/

Re: [OT] Re: Struts tile and other tag includes

Posted by Dave Newton <ne...@yahoo.com>.
Then how do you figure it's been deprecated? It's the
only thing that will allow doing what the original
post was talking about.

--- Yayo <ed...@gmail.com> wrote:

> I know!
> 
> On 8/12/07, Dave Newton <ne...@yahoo.com>
> wrote:
> >
> > --- Yayo <ed...@gmail.com> wrote:
> > > think that's a bad solution, the <include> has
> been
> > > deprecated by the use of tiles and the like to
> > > compose pages... and even with that I don't
> think
> > > it will work...
> >
> > <%@ include ...%> is a directive; the file is
> inserted
> > at compile, not run, time.
> >
> > d.
> >
> >
> >
> >
> >
>
____________________________________________________________________________________Ready
> > for the edge of your seat?
> > Check out tonight's top picks on Yahoo! TV.
> > http://tv.yahoo.com/
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 
> 
> -- 
> "Nada fija tan intensamente una cosa a la memoria
> como el deseo de
> olvidarla." (Michel de Montaigne)
> 
> http://yayocaturas.blogspot.com/
> 



       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT] Re: Struts tile and other tag includes

Posted by Yayo <ed...@gmail.com>.
I know!

On 8/12/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Yayo <ed...@gmail.com> wrote:
> > think that's a bad solution, the <include> has been
> > deprecated by the use of tiles and the like to
> > compose pages... and even with that I don't think
> > it will work...
>
> <%@ include ...%> is a directive; the file is inserted
> at compile, not run, time.
>
> d.
>
>
>
>
> ____________________________________________________________________________________Ready
> for the edge of your seat?
> Check out tonight's top picks on Yahoo! TV.
> http://tv.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/

[OT] Re: Struts tile and other tag includes

Posted by Dave Newton <ne...@yahoo.com>.
--- Yayo <ed...@gmail.com> wrote:
> think that's a bad solution, the <include> has been
> deprecated by the use of tiles and the like to 
> compose pages... and even with that I don't think
> it will work...

<%@ include ...%> is a directive; the file is inserted
at compile, not run, time.

d.



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts tile and other tag includes

Posted by Yayo <ed...@gmail.com>.
 think that's a bad solution, the <include> has been deprecated by the use
of tiles and the like to compose pages... and even with that I don't think
it will work...

On 8/11/07, Martin Gainty <mg...@hotmail.com> wrote:
>
> Jim-
>
> The simplest answer is to put all your tlds in an TLDInclude.jsp
> then call that block in for each jsp
> /**********contents of TLDinclude.jsp**********/
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
>
> /*************Now for each and very jsp include this file at the top of
> your
> file**********/
> <%@ include file="/path_to_jsp/TLDinclude.jsp"%>
>
> Im sure there is a more elegant and complex solution out there somewhere
>
> M--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> From: "Jim Reynolds" <ji...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Friday, August 10, 2007 9:24 PM
> Subject: Re: Struts tile and other tag includes
>
>
> >I have something like this: This is the layout, or tiles template as
> > the docs state.
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
> >
> > <html:html>
> > <head>
> >  <title><bean:message key="global.title"/></title>
> >  <html:base/>
> > </head>
> > <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
> >
> >  <!-- Header page information -->
> >  <tiles:insert attribute="header"/>
> >
> > So on that page, I have the taglib uris for html, bean, etc.
> >
> > Now lets say I have this which uses the layout
> > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
> >
> > <tiles:insert page="/layouts/storefrontDefaultLayout.jsp" flush="true">
> >  <tiles:put name="header" value="/common/header.jsp" />
> >  <tiles:put name="menubar" value="/common/menubar.jsp" />
> >  <tiles:put name="body-content" value="/index-body.jsp" />
> >  <tiles:put name="copyright" value="/common/copyright.jsp" />
> > </tiles:insert>
> >
> > So in each of my pages now, such as header.jsp, menubar.jsp, etc. I
> > have to put the html, bean, etc tags in each of these put pages., like
> > so:
> > menubar.jsp (example:
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> >
> > So basically, I am finding myself putting in the taglibs in each page
> > I am put(ting) in my template.  So I feel I am duplicating too much
> > code.
> >
> > Does this make sense? Possibly, I am doing something wrong?
> >
> > Thanks,
> >
> >
> > On 8/10/07, Dave Newton <ne...@yahoo.com> wrote:
> >> Hmm; repeat?
> >>
> >> --- Jim Reynolds <ji...@gmail.com> wrote:
> >> > Struts 1.29 app that uses tiles definitions.
> >> > Question is: I am finding myself having to call the
> >>
> >> > taglib in the layout, and also in each tile.
> >>
> >> Remember; every JSP is a standalone servlet.
> >>
> >> d.
> >>
> >>
> >>
> >>
> >>
> ____________________________________________________________________________________
> >> Need a vacation? Get great deals
> >> to amazing places on Yahoo! Travel.
> >> http://travel.yahoo.com/
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/

Re: Struts tile and other tag includes

Posted by Martin Gainty <mg...@hotmail.com>.
Jim-

The simplest answer is to put all your tlds in an TLDInclude.jsp
then call that block in for each jsp
/**********contents of TLDinclude.jsp**********/
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>

/*************Now for each and very jsp include this file at the top of your 
file**********/
<%@ include file="/path_to_jsp/TLDinclude.jsp"%>

Im sure there is a more elegant and complex solution out there somewhere

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Jim Reynolds" <ji...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, August 10, 2007 9:24 PM
Subject: Re: Struts tile and other tag includes


>I have something like this: This is the layout, or tiles template as
> the docs state.
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
>
> <html:html>
> <head>
>  <title><bean:message key="global.title"/></title>
>  <html:base/>
> </head>
> <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
>
>  <!-- Header page information -->
>  <tiles:insert attribute="header"/>
>
> So on that page, I have the taglib uris for html, bean, etc.
>
> Now lets say I have this which uses the layout
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
>
> <tiles:insert page="/layouts/storefrontDefaultLayout.jsp" flush="true">
>  <tiles:put name="header" value="/common/header.jsp" />
>  <tiles:put name="menubar" value="/common/menubar.jsp" />
>  <tiles:put name="body-content" value="/index-body.jsp" />
>  <tiles:put name="copyright" value="/common/copyright.jsp" />
> </tiles:insert>
>
> So in each of my pages now, such as header.jsp, menubar.jsp, etc. I
> have to put the html, bean, etc tags in each of these put pages., like
> so:
> menubar.jsp (example:
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
>
> So basically, I am finding myself putting in the taglibs in each page
> I am put(ting) in my template.  So I feel I am duplicating too much
> code.
>
> Does this make sense? Possibly, I am doing something wrong?
>
> Thanks,
>
>
> On 8/10/07, Dave Newton <ne...@yahoo.com> wrote:
>> Hmm; repeat?
>>
>> --- Jim Reynolds <ji...@gmail.com> wrote:
>> > Struts 1.29 app that uses tiles definitions.
>> > Question is: I am finding myself having to call the
>>
>> > taglib in the layout, and also in each tile.
>>
>> Remember; every JSP is a standalone servlet.
>>
>> d.
>>
>>
>>
>>
>> ____________________________________________________________________________________
>> Need a vacation? Get great deals
>> to amazing places on Yahoo! Travel.
>> http://travel.yahoo.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts tile and other tag includes

Posted by Yayo <ed...@gmail.com>.
I think you're wrong but doing well ^g^
You need to include in each page the references to the tag-libs you're using
and I would not call that "the code" of the page, maybe the header or the
include section ^^

On 8/11/07, Jim Reynolds <ji...@gmail.com> wrote:
>
> I have something like this: This is the layout, or tiles template as
> the docs state.
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
>
> <html:html>
> <head>
>   <title><bean:message key="global.title"/></title>
>   <html:base/>
> </head>
> <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
>
>   <!-- Header page information -->
>   <tiles:insert attribute="header"/>
>
> So on that page, I have the taglib uris for html, bean, etc.
>
> Now lets say I have this which uses the layout
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
>
> <tiles:insert page="/layouts/storefrontDefaultLayout.jsp" flush="true">
>   <tiles:put name="header" value="/common/header.jsp" />
>   <tiles:put name="menubar" value="/common/menubar.jsp" />
>   <tiles:put name="body-content" value="/index-body.jsp" />
>   <tiles:put name="copyright" value="/common/copyright.jsp" />
> </tiles:insert>
>
> So in each of my pages now, such as header.jsp, menubar.jsp, etc. I
> have to put the html, bean, etc tags in each of these put pages., like
> so:
> menubar.jsp (example:
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
>
> So basically, I am finding myself putting in the taglibs in each page
> I am put(ting) in my template.  So I feel I am duplicating too much
> code.
>
> Does this make sense? Possibly, I am doing something wrong?
>
> Thanks,
>
>
> On 8/10/07, Dave Newton <ne...@yahoo.com> wrote:
> > Hmm; repeat?
> >
> > --- Jim Reynolds <ji...@gmail.com> wrote:
> > > Struts 1.29 app that uses tiles definitions.
> > > Question is: I am finding myself having to call the
> >
> > > taglib in the layout, and also in each tile.
> >
> > Remember; every JSP is a standalone servlet.
> >
> > d.
> >
> >
> >
> >
> >
> ____________________________________________________________________________________
> > Need a vacation? Get great deals
> > to amazing places on Yahoo! Travel.
> > http://travel.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Nada fija tan intensamente una cosa a la memoria como el deseo de
olvidarla." (Michel de Montaigne)

http://yayocaturas.blogspot.com/

Re: Struts tile and other tag includes

Posted by Jim Reynolds <ji...@gmail.com>.
I have something like this: This is the layout, or tiles template as
the docs state.
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>

<html:html>
 <head>
  <title><bean:message key="global.title"/></title>
  <html:base/>
 </head>
 <body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">

  <!-- Header page information -->
  <tiles:insert attribute="header"/>

So on that page, I have the taglib uris for html, bean, etc.

Now lets say I have this which uses the layout
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>

<tiles:insert page="/layouts/storefrontDefaultLayout.jsp" flush="true">
  <tiles:put name="header" value="/common/header.jsp" />
  <tiles:put name="menubar" value="/common/menubar.jsp" />
  <tiles:put name="body-content" value="/index-body.jsp" />
  <tiles:put name="copyright" value="/common/copyright.jsp" />
</tiles:insert>

So in each of my pages now, such as header.jsp, menubar.jsp, etc. I
have to put the html, bean, etc tags in each of these put pages., like
so:
menubar.jsp (example:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

So basically, I am finding myself putting in the taglibs in each page
I am put(ting) in my template.  So I feel I am duplicating too much
code.

Does this make sense? Possibly, I am doing something wrong?

Thanks,


On 8/10/07, Dave Newton <ne...@yahoo.com> wrote:
> Hmm; repeat?
>
> --- Jim Reynolds <ji...@gmail.com> wrote:
> > Struts 1.29 app that uses tiles definitions.
> > Question is: I am finding myself having to call the
>
> > taglib in the layout, and also in each tile.
>
> Remember; every JSP is a standalone servlet.
>
> d.
>
>
>
>
> ____________________________________________________________________________________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts tile and other tag includes

Posted by Dave Newton <ne...@yahoo.com>.
Hmm; repeat?

--- Jim Reynolds <ji...@gmail.com> wrote:
> Struts 1.29 app that uses tiles definitions.
> Question is: I am finding myself having to call the 

> taglib in the layout, and also in each tile. 

Remember; every JSP is a standalone servlet.

d.



       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org