You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by majiaben <ma...@gmail.com> on 2007/04/20 20:00:22 UTC
Tiles 2 Help
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
Re: Tiles 2 Help
Posted by Antonio Petrelli <an...@gmail.com>.
2007/4/23, majiaben <ma...@gmail.com>:
> Well, guess I have learned. :-)
>
> I am using Tiles 2.0.3 for a brand new development project. Is there a new
> version of Tiles planned? If so, will it change a lot too?
Tiles 2.0.3 will be released officially very soon. Are you using the
test build? If yes, don't worry, this will be the "official" 2.0.3
release :-)
Anyway notice that 2.0.3 has been declared as alpha quality, so expect
some changes (though I don't think that it will impact on normal
users, I mean xml and jsp won't change).
Antonio
Re: Tiles 2 Help
Posted by majiaben <ma...@gmail.com>.
Well, guess I have learned. :-)
I am using Tiles 2.0.3 for a brand new development project. Is there a new
version of Tiles planned? If so, will it change a lot too?
Cheers,
Daniel
> It's not an appearance :-) The Tiles 2 DTD changed a lot between 2.0.1
> and 2.0.3, and so did the tag libraries.
>
> Antonio
>
Re: Tiles 2 Help
Posted by Antonio Petrelli <an...@gmail.com>.
2007/4/23, majiaben <ma...@gmail.com>:
> Hi Antonio,
>
> I figured it out ... Apparently the Tiles 2 DTD is different from version
> 1. In tiles.xml, after I changed <put name="title" ..> to <put-attribute
> name="title" ..>, it worked.
It's not an appearance :-) The Tiles 2 DTD changed a lot between 2.0.1
and 2.0.3, and so did the tag libraries.
Antonio
Re: Tiles 2 Help
Posted by majiaben <ma...@gmail.com>.
Hi Antonio,
I figured it out ... Apparently the Tiles 2 DTD is different from version
1. In tiles.xml, after I changed <put name="title" ..> to <put-attribute
name="title" ..>, it worked.
Thanks!
Daniel
On 4/22/07, Antonio Petrelli <an...@gmail.com> wrote:
>
> 2007/4/20, majiaben <ma...@gmail.com>:
> > 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.
>
> Did you check the log?
>
> Antonio
>
Re: Tiles 2 Help
Posted by Antonio Petrelli <an...@gmail.com>.
2007/4/20, majiaben <ma...@gmail.com>:
> 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.
Did you check the log?
Antonio