tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From majiaben <majia...@gmail.com>
Subject Tiles 2 Help
Date Fri, 20 Apr 2007 18:00:22 GMT
Hi,

I just started using Struts 2 (2.0.6) and Tiles 2 (2.0.1).  But my first
simple example didn't work. Please help!

In tiles.xml, I have:

<tiles-definitions>

<definition name="TypeA" template="/ui/layout/myLayout.jsp">
  <put name="title"  type="string"  value="Hello World" />
</definition>

</tiles-definitions>

myLayout.jsp looks like this:

<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<HTML>
  <HEAD>
    <TITLE><tiles:getAsString name="title"/></TITLE>
  </HEAD>
<BODY>
<tiles:insertAttribute name="title"/>
</BODY>
</HTML>

I was hoping to have "Hello World" displayed in both page title and body.
Unfortunately, all that I got was a blank page. I tried a few alternatives
but still could not get the expected result.

Thanks in advance,

Daniel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message