Return-Path: Delivered-To: apmail-tiles-users-archive@minotaur.apache.org Received: (qmail 27435 invoked from network); 22 Oct 2009 22:30:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Oct 2009 22:30:33 -0000 Received: (qmail 72655 invoked by uid 500); 22 Oct 2009 22:30:33 -0000 Delivered-To: apmail-tiles-users-archive@tiles.apache.org Received: (qmail 72593 invoked by uid 500); 22 Oct 2009 22:30:33 -0000 Mailing-List: contact users-help@tiles.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tiles.apache.org Delivered-To: mailing list users@tiles.apache.org Received: (qmail 72583 invoked by uid 99); 22 Oct 2009 22:30:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 22:30:33 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of znbailey@wethecitizens.com designates 74.7.6.179 as permitted sender) Received: from [74.7.6.179] (HELO mail.wethecitizens.com) (74.7.6.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Oct 2009 22:30:30 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.wethecitizens.com (Postfix) with ESMTP id 64224300002 for ; Thu, 22 Oct 2009 18:29:54 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.wethecitizens.com Received: from mail.wethecitizens.com ([127.0.0.1]) by localhost (mail.wethecitizens.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ub9SAzGCPcdi for ; Thu, 22 Oct 2009 18:29:54 -0400 (EDT) Received: from zach.wtcdev.com (zach.wtcdev.com [172.16.1.26]) by mail.wethecitizens.com (Postfix) with ESMTP id 0187A300001 for ; Thu, 22 Oct 2009 18:29:53 -0400 (EDT) From: Zach Bailey Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Subject: Infinite Loop in Tiles when using jsp:include Date: Thu, 22 Oct 2009 18:30:08 -0400 Message-Id: <3717EE04-500F-478F-8E38-CA3628C5C3A7@wethecitizens.com> To: users@tiles.apache.org Mime-Version: 1.0 (Apple Message framework v1076) X-Mailer: Apple Mail (2.1076) Hello, I am using Tiles 2.1.3 in Spring MVC. I have two definitions/pages set up in the following way: page1.jsp:

Page 1

...some content... The URL "/modules/moduleOne" is mapped to a Spring MVC controller that simply returns the tile definition named "moduleOne": moduleOne.jsp:

I am a module, short and stout.

When I hit the URL "/modules/moduleOne" directly, the page renders fine. However, when I hit the URL for page1, the request dispatcher essentially gets stuck in an endless loop, with the condensed stack looking like this: - pageOne.jsp - Jsp Servlet/App Dispatcher/Filter Chain ServletTilesRequestContext.include(String) line: 260 ServletTilesRequestContext.dispatch(String) line: 220 TemplateAttributeRenderer.write(Object, Attribute, TilesRequestContext) line: 44 TemplateAttributeRenderer(AbstractBaseAttributeRenderer).render (Attribute, TilesRequestContext) line: 103 BasicTilesContainer.render(Attribute, TilesRequestContext) line: 669 BasicTilesContainer.render(TilesRequestContext, AttributeContext) line: 689 BasicTilesContainer.render(TilesRequestContext, Definition) line: 643 BasicTilesContainer.render(TilesRequestContext, String) line: 626 BasicTilesContainer.render(String, Object...) line: 322 - TilesView.render() - Spring Dispatcher Servlet - JspRuntimeLibrary.include() - pageOne.jsp The logic that is grabbing my attention as doing something wrong is the code in BasicAttributeContext.inherit (which calls BasicAttributeContext.inheritParentTemplateAttribute) which "inherits" the definition, but only if the parent is empty. In this situation, this logic is wrong - due to the "include", the child/subcontext's template attribute should ALWAYS be honored. Am I off base here? Note that when including the module from a page which already extends a parent template, this behavior does not occur: page2.jsp:

Page 2

...some content... This works fine. Let me know if you need more information, or if I need to put together a simple project that replicates this behavior. Thanks, -Zach Bailey