I have been trying to update my Tiles development from release
shale-framework-20061004 (works fine) to shale-framework-20061111 (fails). I am
using tiles-core-2.0-r468346-SNAPSHOT.jar, which is included with the Shale
release. I am also using the Tiles 2 FAQ as a guide. I immediately die with a
404 ("The requested resource (/starraShale/) is not available.") with the
following Tomcat log entries:
Nov 14, 2006 2:18:03 PM org.apache.tiles.listener.TilesListener
contextInitialized
INFO: Initializing TilesListener
Nov 14, 2006 2:18:03 PM org.apache.tiles.listener.TilesListener
readFactoryConfig
INFO: CONFIG FILES DEFINED IN WEB.XML
Nov 14, 2006 2:18:04 PM org.apache.tiles.listener.TilesListener
initDefinitionsFactory
INFO: initializing definitions factory...
SaInitializer.contextInitialized (Note: This message is from my own listener
that currently does nothing but print his message.)
Nov 14, 2006 2:18:04 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Nov 14, 2006 2:18:04 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/starraShale] startup failed due to previous errors
I think the problem is in my layout which had entries like
<td valign="top"><tiles:insert flush="false" name="body"/></td>,
but now has
<td valign="top"><tiles:attribute flush="false" name="body"/></td>
For sure it can't find the first Tile which is accessed via my index.jsp as
follows:
<jsp:forward page="systemLogon.faces"/>
where my tiles.xml has the following entries:
<definition name="/systemLogon"
extends="/siteMainLayout">
<put name="body"
type="template"
value="/jsp/system/logon.jsp"/>
</definition>
<definition name="/siteMainLayout"
path="/tiles/layouts/starraLayout.jsp">
<put name="title" value="/tiles/common/title.jsp"/>
<put name="header" value="/tiles/common/header.jsp"/>
<put name="menuBar" value="/tiles/common/menuBar.jsp"/>
<put name="body" value=""/>
<put name="footer" value="/tiles/common/footer.jsp"/>
</definition>
I have tried every combination I could think of to replace the tiles:insert.
Yes, I tried both tiles:insertTemplate and tiles:insertDefinition (even though
tiles:attribute was the only one that made sense to me). Nothing I have tried
works.
Here is my layout:
<%-- starraLayout.jsp
2006-11-14 RJS. New.
--%>
<%@ include file="/jspf/common/taglibs.jsp" %>
<%@ include file="/jspf/common/messages.jsp" %>
<%-- Layout Tiles
This layout create a html page with <header> and <body> tags. It render
a header, left menu, body and footer tile.
@param title String use in page title
@param header: Header tile (jsp url or definition name)
@param menuBar: Menu Bar
@param body: Body
@param footer: Footer
--%>
<f:view>
<html>
<head>
<link href="<h:outputText
value="#{facesContext.externalContext.requestContextPath}"/><h:outputText
value="#{msg['style.base']}"/>"
rel="stylesheet"
type="text/css"/>
<title><tiles:attribute flush="false" name="title"/></title>
</head>
<body background="<h:outputText
value="#{facesContext.externalContext.requestContextPath}"/><h:outputText
value="#{msg['img.background.app']}"/>"/>
<table border="0" cellspacing="5" width="100%" >
<tr>
<td colspan="2"><tiles:attribute flush="false" name="header"/></td>
</tr>
<tr>
<td valign="top" width="13%">
<tiles:attribute flush="false" name="menuBar"/>
</td>
<td valign="top">
<tiles:attribute flush="false" name="body"/>
</td>
</tr
<tr>
<td align="center" colspan="2">
<tiles:attribute flush="false" name="footer"/>
</td>
</tr>
</table>
</body>
</html>
</f:view>
Thanks in advance for your help.
Dick