myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Gavazuk" <antongava...@gmail.com>
Subject Re: [TILES] Unable to find configured definition '/WEB-INF/tiles.xml
Date Mon, 24 Mar 2008 23:22:01 GMT
Hi again,
found a reason - looked in Tiles src bundle which I have (2.0.5)

BasicTilesContainer.java:
protected String getResourceString(Map<String, String> parms) {
        String resourceStr = parms.get(DEFINITIONS_CONFIG);
        if (resourceStr == null) {
            resourceStr = parms.get(LEGACY_DEFINITIONS_CONFIG);
        }
        if (resourceStr == null) {
            resourceStr = "/WEB-INF/tiles.xml";
        }
        return resourceStr;
    }

where
/**
     * Constant representing the configuration parameter
     * used to define the tiles definition resources.
     */
    public static final String DEFINITIONS_CONFIG =
"org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG";

    /**
     * Compatibility constant.
     *
     * @deprecated use {@link #DEFINITIONS_CONFIG} to avoid namespace
collisions.
     */
    private static final String LEGACY_DEFINITIONS_CONFIG =
"definitions-config";

so if you want to use customizable tiles location, use in web.xml
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
        <param-value>/WEB-INF/tiles/tiles.xml</param-value>
 </context-param>

or rewrite this part of tiles :)

2008/3/24, Anton Gavazuk <antongavazuk@gmail.com>:
> Richard,
>  of course I ensured I put everything without errors and this is my
>  question - why Tiles configuration module does not look in context
>  param - I suppose it's not a Tomahawk problem - it's something related
>  to Tiles...
>
>  2008/3/24, Richard Yee <ryee@cruzio.com>:
>
> > Anton,
>  >  Are you sure you put the file in the right place and configured web.xml
>  >  correctly?
>  >
>  >  Your example showed this:
>  >
>  >
>  >         <param-value>/WEB-INF/tiles/tiles.xml</param-value>
>  >
>  >
>  >
>  > Your error message shows this:
>  >
>  >
>  >  definition '/WEB-INF/tiles.xml'
>  >
>  >
>  > -Richard
>  >
>  >
>  >
>  >  Anton Gavazuk wrote:
>  >  > Hello all,
>  >  > I'm migrating from JSF1.1 to JSF1.2 and Tiles 2
>  >  > First I'm trying to get to work simple pages from my app - I
>  >  > downloaded Tomahawk Tiles 2 example - it's working fine.
>  >  > Second - I added my own tiles definition XMl file and changed
>  >  > according context param in web.xml:
>  >  >  <context-param>
>  >  >         <param-name>tiles-definitions</param-name>
>  >  >         <param-value>/WEB-INF/tiles/tiles.xml</param-value>
>  >  >     </context-param>
>  >  >
>  >  > But when Im making request to defined page I see error in log
>  >  > 22:36:41,390 INFO  [BasicTilesContainer] Initializing Tiles2 container. .
.
>  >  > 22:36:41,390 WARN  [BasicTilesContainer] Unable to find configured
>  >  > definition '/WEB-INF/tiles.xml'
>  >  > 22:36:41,406 INFO  [BasicTilesContainer] Tiles2 container
>  >  > initialization complete.
>  >  > 22:36:41,406 INFO  [TilesAccess] Publishing TilesContext for context:
>  >  > org.apache.catalina.core.ApplicationContextFacade
>  >  >
>  >  > Any ideas why it's working in such way?
>  >  >
>  >  >
>  >  >
>  >
>  >
>

Mime
View raw message