You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Marcus Oenicke <m....@it4u-berlin.biz> on 2007/05/08 23:46:11 UTC
InsertAttributeTag reports Attribute 'header' not found
Hi,
I'm working with Tiles 2.0.3 and Struts 2.0.6 in a Tomcat 5.5.20
environment.
Maybe I haven't succeeded in dropping all references to previous versions of
Tiles, including the one delivered with Struts 2, since I keep experiencing
the following TilesException:
23:15:16,816 ERROR RoleSecurityTagSupport:80 - Error executing tag:
Attribute 'header' not found.
org.apache.tiles.TilesException: Attribute 'header' not found.
at
org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:113)
at
org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:172)
at
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:76)
at
org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:82)
at
org.apache.jsp.jsp.tiles.hv_005fmain_jsp._jspx_meth_tiles_insertAttribute_0(hv_005fmain_jsp.java:98)
...
This looks very similar to issue TILES-121 which was reported for version
2.0.1, but I don't expect the same cause, really.
I use the following entry in tiles-defs.xml, including the corrected uri for
the DTD:
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"org/apache/tiles/resources/tiles-config_2_0.dtd">
<tiles-definitions>
<definition name="basicLayout" template="/jsp/tiles/hv_main.jsp">
<put-attribute name="header" type="template" value="/jsp/tiles/header.jsp"
/>
</definition>
</tiles-definitions>
The hv_main.jsp looks like this:
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<html>
<head></head>
<body">
<tiles:insertAttribute name="header" />
<div id="body">this is the body</div>
</body>
</html>
I have included the following JARs in WEB-INF/lib:
- tiles-api-2.0.3.jar
- tiles-core-2.0.3.jar
- tiles-jsp-2.0.3.jar
- struts2-core-2.0.6.jar
I have removed the struts2-tiles-plugin-2.0.6.jar to prevent negative
interaction, but it didn't change anything.
Anything wrong so far?
Very grateful for any tip,
Marcus
--
View this message in context: http://www.nabble.com/InsertAttributeTag-reports-Attribute-%27header%27-not-found-tf3712428.html#a10384675
Sent from the tiles users mailing list archive at Nabble.com.
RE: [ANNOUNCE] InsertAttributeTag reports Attribute 'header' not found
Posted by David Chisholm <dc...@onenetwork.com>.
This is the same situation I recently encountered - new TLD syntax combined
with old DTD. If you use the new DTD, then the configuration parsing will
ignore elements like put-attribute. Also unless you have debug logging
enabled, you will not receive any messages that the parsing skipped those
elements.
-- David
-----Original Message-----
From: Antonio Petrelli [mailto:antonio.petrelli@gmail.com]
Sent: Wednesday, May 09, 2007 9:32 AM
To: users@tiles.apache.org
Subject: Re: [ANNOUNCE] InsertAttributeTag reports Attribute 'header' not
found
2007/5/9, Marcus Oenicke <m....@it4u-berlin.biz>:
>
>
> Ah, it seems I found the solution.
>
> The tutorial for the Tiles 2 Plugin shows an example with a wrong
> (probably
> outdated) uri for the dtd.
>
> It should NOT be: %@ taglib uri="http://struts.apache.org/tags-tiles"
> prefix="tiles" %>,
> BUT: %@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"
> %>
>
> So the JSPs use Tiles 2 syntax, while within tiles-defs.xml the older
> syntax, e.g. <put name="..." /> needs to be employed.
>
> Is that correct, Antonio?
I think so, the problem is that Tiles 2.0.3 (the latest alpha) uses VERY
different DTD and TLD, so when you need to upgrade, you will need to change
all of your code...
Antonio
Re: [ANNOUNCE] InsertAttributeTag reports Attribute 'header' not found
Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/9, Marcus Oenicke <m....@it4u-berlin.biz>:
>
>
> Ah, it seems I found the solution.
>
> The tutorial for the Tiles 2 Plugin shows an example with a wrong
> (probably
> outdated) uri for the dtd.
>
> It should NOT be: %@ taglib uri="http://struts.apache.org/tags-tiles"
> prefix="tiles" %>,
> BUT: %@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
>
> So the JSPs use Tiles 2 syntax, while within tiles-defs.xml the older
> syntax, e.g. <put name="..." /> needs to be employed.
>
> Is that correct, Antonio?
I think so, the problem is that Tiles 2.0.3 (the latest alpha) uses VERY
different DTD and TLD, so when you need to upgrade, you will need to change
all of your code...
Antonio
Re: [ANNOUNCE] InsertAttributeTag reports Attribute 'header' not
found
Posted by Marcus Oenicke <m....@it4u-berlin.biz>.
Ah, it seems I found the solution.
The tutorial for the Tiles 2 Plugin shows an example with a wrong (probably
outdated) uri for the dtd.
It should NOT be: %@ taglib uri="http://struts.apache.org/tags-tiles"
prefix="tiles" %>,
BUT: %@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
So the JSPs use Tiles 2 syntax, while within tiles-defs.xml the older
syntax, e.g. <put name="..." /> needs to be employed.
Is that correct, Antonio?
Best regards,
Marcus
Antonio Petrelli-3 wrote:
>
> 2007/5/8, Marcus Oenicke <m....@it4u-berlin.biz>:
>>
>>
>> I'm working with Tiles 2.0.3 and Struts 2.0.6 in a Tomcat 5.5.20
>> environment.
>
>
>
> I think this is the problem: Struts 2.0.6 IS NOT COMPATIBLE with Tiles
> 2.0.3.
> Currently, you can only use Tiles 2.0.3 in standalone mode.
>
> I have removed the struts2-tiles-plugin-2.0.6.jar to prevent negative
>> interaction, but it didn't change anything.
>> Anything wrong so far?
>
>
>
> The plugin is needed if you want Struts 2 to work with (compatible
> versions
> of) Tiles.
>
> I think that your only option is waiting (or collaborating :-) )
>
> Antonio
>
>
--
View this message in context: http://www.nabble.com/InsertAttributeTag-reports-Attribute-%27header%27-not-found-tf3712428.html#a10391493
Sent from the tiles users mailing list archive at Nabble.com.
Re: [ANNOUNCE] InsertAttributeTag reports Attribute 'header' not
found
Posted by Marcus Oenicke <m....@it4u-berlin.biz>.
Hi, Antonio,
is that so?
OK, but then I have to admit that I am a bit lost regarding compatible
versions and what's more - the applicable documentation.
I am well aware that all of you guys (the Struts 2 *and* Tiles 2 developers)
have had - and are still having - a tremendous amout of work to cope with
and I know how hard it is to keep up with the documentation.
But is there currently a fairly reliable description for the configuration
with Struts 2?
By the way - I think you are all doing an excellent job!
Struts 2 has become so much more flexible and intuitive and it seems to me
that Tiles 2 is going very much the same way.
Best regards,
Marcus
Antonio Petrelli-3 wrote:
>
> 2007/5/8, Marcus Oenicke <m....@it4u-berlin.biz>:
>>
>>
>> I'm working with Tiles 2.0.3 and Struts 2.0.6 in a Tomcat 5.5.20
>> environment.
>
>
>
> I think this is the problem: Struts 2.0.6 IS NOT COMPATIBLE with Tiles
> 2.0.3.
> Currently, you can only use Tiles 2.0.3 in standalone mode.
>
> I have removed the struts2-tiles-plugin-2.0.6.jar to prevent negative
>> interaction, but it didn't change anything.
>> Anything wrong so far?
>
>
>
> The plugin is needed if you want Struts 2 to work with (compatible
> versions
> of) Tiles.
>
> I think that your only option is waiting (or collaborating :-) )
>
> Antonio
>
>
--
View this message in context: http://www.nabble.com/InsertAttributeTag-reports-Attribute-%27header%27-not-found-tf3712428.html#a10390730
Sent from the tiles users mailing list archive at Nabble.com.
Re: InsertAttributeTag reports Attribute 'header' not found
Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/8, Marcus Oenicke <m....@it4u-berlin.biz>:
>
>
> I'm working with Tiles 2.0.3 and Struts 2.0.6 in a Tomcat 5.5.20
> environment.
I think this is the problem: Struts 2.0.6 IS NOT COMPATIBLE with Tiles 2.0.3.
Currently, you can only use Tiles 2.0.3 in standalone mode.
I have removed the struts2-tiles-plugin-2.0.6.jar to prevent negative
> interaction, but it didn't change anything.
> Anything wrong so far?
The plugin is needed if you want Struts 2 to work with (compatible versions
of) Tiles.
I think that your only option is waiting (or collaborating :-) )
Antonio