[ 
https://issues.apache.org/struts/browse/TILES-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephan Schroeder updated TILES-325:
------------------------------------

    Description: 
In spite of the fact that i have one wildcard definition to match them all in 
my Struts2.1 webapplication with Tiles 2.1

<definition name="*" template="/layout/simpleLayout.ftl">
  <put-attribute name="body" value="{1}" />
</definition> 

i get a 
WARNING: Unable to find the definition '/public/show.ftl'

org.apache.tiles.definition.NoSuchDefinitionException: /public/show.ftl 
    
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:612)
    
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:307)
    org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
    ...

when used

<action name="index">
  <result type="tiles">/public/show.ftl</result>
</action>

The problem seems to be related with the '/'-character wich is part of the 
definition name to look for.

<definition name="/*/*" template="/layout/simpleLayout.ftl">
  <put-attribute name="body" value="/{1}/{2}" />
</definition>

works.

  was:
In spite of the fact that i have one wildcard definition to match them all in 
my Struts2.1 webapplication with Tiles 2.1

<definition name="*" template="/layout/simpleLayout.ftl">
  <put-attribute name="body" value="{1}" />
</definition> 

i get a 
WARNING: Unable to find the definition '/public/show.ftl'

org.apache.tiles.definition.NoSuchDefinitionException: /public/show.ftl 
    
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:612)
    
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:307)
    org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
    ...

when used

<action name="index">
  <result type="tiles">/public/show.ftl</result>
</action>


> "Unable to find the definition" in spite of wildcard definition <definition 
> name="*" ...>
> -----------------------------------------------------------------------------------------
>
>                 Key: TILES-325
>                 URL: https://issues.apache.org/struts/browse/TILES-325
>             Project: Tiles
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>         Environment: Tomcat6, Java6, Vista, Eclipse3.4, Struts2.1.2, Tiles 
> 2.1.0
>            Reporter: Stephan Schroeder
>         Attachments: wildcardBug.war
>
>
> In spite of the fact that i have one wildcard definition to match them all in 
> my Struts2.1 webapplication with Tiles 2.1
> <definition name="*" template="/layout/simpleLayout.ftl">
>   <put-attribute name="body" value="{1}" />
> </definition> 
> i get a 
> WARNING: Unable to find the definition '/public/show.ftl'
> org.apache.tiles.definition.NoSuchDefinitionException: /public/show.ftl 
>     
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:612)
>     
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:307)
>     org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
>     ...
> when used
> <action name="index">
>   <result type="tiles">/public/show.ftl</result>
> </action>
> The problem seems to be related with the '/'-character wich is part of the 
> definition name to look for.
> <definition name="/*/*" template="/layout/simpleLayout.ftl">
>   <put-attribute name="body" value="/{1}/{2}" />
> </definition>
> works.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to