You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "victorsosa (JIRA)" <ji...@apache.org> on 2016/04/03 17:26:25 UTC

[jira] [Comment Edited] (WW-4623) Multiple tiles.xml in web.xml

    [ https://issues.apache.org/jira/browse/WW-4623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15223357#comment-15223357 ] 

victorsosa edited comment on WW-4623 at 4/3/16 3:25 PM:
--------------------------------------------------------

Guys, I found the issue.
Using the default loading

First the default var should be {code}"**/tiles*.xml"{code}

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested files.

Also loading multiple file using <context-param> the code is not splitting using the commas for the differrents files and loading them.


was (Author: victorsosa):
Guys, I found the issue.
Using the default loading

First the default var should be "**/tiles*.xml"

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested files.

Also loading multiple file using <context-param> the code is not splitting using the commas for the differrents files and loading them.

>  Multiple tiles.xml in web.xml
> ------------------------------
>
>                 Key: WW-4623
>                 URL: https://issues.apache.org/jira/browse/WW-4623
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.3.28
>            Reporter: D Qiu
>            Priority: Minor
>
> Using struts2.3.24.1, the application can find the definition in a.xml and b.xml
> (web.xml)
> <context-param>
> 	<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
> 	<param-value>/WEB-INF/a.xml,/WEB-INF/b.xml</param-value>
> </context-param>
> With struts2.3.28, the application generates "org.apache.tiles.definition.NoSuchDefinitionException" xxx at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:625)
> (web.xml)
> <context-param>
> 	<param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
>     <param-value>/WEB-INF/a.xml,/WEB-INF/b.xml</param-value>
> </context-param>
> ----------
> It works fine with a single file
> (web.xml)
> <context-param>
> 	<param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
>     <param-value>/WEB-INF/a.xml</param-value>
> </context-param>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)