Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 52202 invoked from network); 12 Aug 2007 20:08:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2007 20:08:27 -0000 Received: (qmail 86038 invoked by uid 500); 12 Aug 2007 20:08:14 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 86008 invoked by uid 500); 12 Aug 2007 20:08:14 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 85997 invoked by uid 99); 12 Aug 2007 20:08:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 13:08:14 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.80.60.30] (HELO mail.megapathdsl.net) (66.80.60.30) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 20:08:18 +0000 Received: from [66.80.194.138] (HELO PortableGenius) by fe.mail.megapathdsl.net (CommuniGate Pro SMTP 5.1.10) with ESMTP id 262508454 for user@struts.apache.org; Sun, 12 Aug 2007 13:06:35 -0700 From: "Rod Bollinger" To: "'Struts Users Mailing List'" References: <638708.44050.qm@web56706.mail.re3.yahoo.com> <000901c7dd13$cb1ab230$036fa8c0@PortableGenius> Subject: RE: [OT] Re: Struts tile and other tag includes Date: Sun, 12 Aug 2007 16:06:33 -0400 Organization: PortableGenius Message-ID: <001301c7dd1c$47c11f10$036fa8c0@PortableGenius> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcfdGglnRJsvgM3KRsKDOyw9kwIXMwAALYNg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Virus-Checked: Checked by ClamAV on apache.org 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 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): > >
> 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 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" %> >
> > 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 wrote: > > > > yeah, I know, but we can use cobol to program cgi instead of java too > > > > On 8/12/07, Dave Newton 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 wrote: > > > > > > > I know! > > > > > > > > On 8/12/07, Dave Newton > > > > wrote: > > > > > > > > > > --- Yayo wrote: > > > > > > think that's a bad solution, the 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