I have run into a problem with the latest tiles-core snapshot: tiles-core-2.0-SNAPSHOT-20060922.jar
and I do realize that it is a nightly build. Specifically, some types of output from a tile do not seem to stay within the tile itself. There seems to be a buffering issue. I have tried to as briefly as possible to indicate the problem below where I show the welcome page, tiles-defs.xml file, the layout page and an affected tile page. I have temporarily placed a webapp at: http://www.lansdaletutoring.com/tilesbug that demonstrates the problem and can make the war file available if desired. The key file contents follow (or at least what I currently believe to be key): tiles-defs.xml: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" "http://struts.apache.org/dtds/tiles-config_1_1.dtd"> <tiles-definitions> <!-- Display Definitions --> <definition name="/mainLayout" path="/tiles/layouts/siteLayout.jsp"> <put name="htmlHeader" value="/tiles/htmlHeaderTile.jsp"/> <put name="header" value="/tiles/headerTile.jsp"/> <put name="rightSideBar" value="/tiles/rightSideBarTile.jsp"/> <put name="footer" value="/tiles/footerTile.jsp"/> </definition> <definition name="/welcomePage" extends="/mainLayout"> <put name="content" type="template" value="/tiles/homeTile.jsp"/> </definition> </tiles-definitions> --------------------------------------------------------------------------------------------------------- index.jsp: <jsp:forward page="/welcomePage.faces"/> --------------------------------------------------------------------------------------------------------- siteLayout.jsp: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> <html lang="en"> <f:view> <head> <base href="http://localhost:8080/TilesBug/tiles/layouts/siteLayout.jsp"> <!-- There seems to be a bug in the tiles core where placeing the title inside the tile causes the title output text to be place OUTSIDE the title tags. Placing it here seems to avoid the problem. --> <!-- title --><!-- h:outputText value="This is a title that causes a tiles core failure."/ --><!-- /title --> <tiles:get name="htmlHeader" flush="false"/> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="margin:0;padding:0"> <!-- Header and Menu --> <tiles:get name="header" flush="false"/> <table border="0" cellspacing="10" cellpadding="0" align="left"> <tr> <td valign="Top" height="150"> <tiles:get name="content" flush="false"/> </td> <td width="190" align="center" valign="top"> <tiles:get name="rightSideBar" flush="false"/> </td> </tr> <tr> <td> <tiles:get name="footer" flush="false"/> </td> <td valign="Top" height="100"> </td> </tr> </table> </body> </f:view> </html> --------------------------------------------------------------------------------------------------------- htmlHeaderTile.jsp: <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <meta name="Generator" content="Port80 Eclipse HTML Editor Plugin; 12/20/2002"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta name="description" content='A description'> <meta name="keywords" content='keyword1 keyword2'> <meta name="robots" content="index,follow"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <!-- There seems to be a bug in the tiles core where placing the title inside the tile causes the title output text to be placed OUTSIDE the title tags shown below. Placing the title outside this tile in the layout page siteLayout.jsp seems to avoid the problem. --> <title><h:outputText value="This is a title that appears to cause a tiles core failure. If you view the html page source you will notice that it has been placed outside the title tags. This problem occurs for graphicImage tags inside commandLink tags as well."/></title> --------------------------------------------------------------------------------------------------------- If you take a look at the welcome page html source at the client end once the page is displayed, you get: <html lang="en"> <head> <base href="http://localhost:8080/TilesBug/tiles/layouts/siteLayout.jsp"> <!-- There seems to be a bug in the tiles core where placeing the title inside the tile causes the title output text to be place OUTSIDE the title tags. Placing it here seems to avoid the problem. --> <!-- title --><!-- h:outputText value="This is a title that causes a tiles core failure."/ --><!-- /title --> This is a title that appears to cause a tiles core failure. If you view the html page source you will notice that it has been placed outside the title tags. This problem occurs for graphicImage tags inside commandLink tags as well. <meta name="Generator" content="Port80 Eclipse HTML Editor Plugin; 12/20/2002"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <meta name="description" content='A description'> <meta name="keywords" content='keyword1 keyword2'> <meta name="robots" content="index,follow"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <!-- There seems to be a bug in the tiles core where placing the title inside the tile causes the title output text to be placed OUTSIDE the title tags shown below. Placing the title outside this tile in the layout page siteLayout.jsp seems to avoid the problem. --> <title></title> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="margin:0;padding:0"> <!-- Header and Menu --> <br> <pre> <!-- This is a blank Tiles definition file with a commented example. --> Some header text. </pre> <table border="0" cellspacing="10" cellpadding="0" align="left"> <tr> <td valign="Top" height="150"> <h1 align="center">Content Tile!</h1> <div> <p> A paragraph of content. <p> A second paragraph of content. <p> A third paragraph of content. </div> </td> <td width="190" align="center" valign="top"> This is a righthand side bar. </td> </tr> <tr> <td> <hr size="1" width="75%"> This is some footer text. </td> <td valign="Top" height="100"> </td> </tr> </table> </body> </html> Notice that the title text ends up outside the html title tags and apparently outside the tile itself. This problem is occurring in a number of places in several different tiles in my webapp and makes it pretty much impossible for me to create valid faces pages. I have reviewed the open bugs and did not see this problem represented, although I could of course have missed it. Have I misconfigured or misused something or is this a new bug? Just to be clear, I am not asking for configuration help from the development group. At this moment I do believe that I have run into a bug that isn't my own. -=> Gregg <=-
signature.asc
Description: OpenPGP digital signature