Friday, March 07, 2008

Path does not start with a "/" character

I get this error when using the tiles plugin when building out some tiles:

java.lang.IllegalArgumentException: Path .some.tiles.path does not start with a "/" character

first, lets pretend that the tile in question looks like this:
<definition name=".some.tiles.path" extends=".some.other.tiles.path"> ..some stuff.. </definition>

ive noticed that the reason for this error can be one of the following:

1. if you look at the tile that this tile extends, and what that tile extends, until you find the tile that extends nothing, that tile should have a definition like this:
<definition name=".some.base.tile" path="/a/real/path/to/some/jsp/somejsp.jsp"> ..some stuff.. </definition>
the key thing, is that the path of the parent tile starts with a "/" character

2. if #1 is not your problem, then you might have a duplicate definition of the tile name which the error talks about.

3. Another thing that can happen is that your tiles path that you are referencing in struts-config.xml does not exist at all, because maybe you misspelled it, in which case that same error is thrown.


  1. You can also get this error by forgetting to include the chainConfig init-param. In the action servlet definition in web.xml, you should have:


    More info:

    1. it worked really,thanks

  2. This also can happen when you include files into the tile layout.

    File which has compilation error! I know this is dumb but took me 2 ours to get it...


  3. Jonathan you are right, I correct my problem using the information of your post. Thanks!!!

  4. This can also happen if you misspell the name in the put tag.


  5. can also happen if the following value param in the tiles plug-in node in web.xml is misconfigured:

    <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />

  6. That error may append if you migrate from struts 1.2 to struts 1.3.
    See this URL for the solution:

  7. problem solved by adding
    tiles plug-in node in web.xml.

  8. +1 ; problem solved by adding
    tiles plug-in node in web.xml.

  9. Hi.
    I tried all the solution that are provided in this thread for this error.... but i am still getting the same error.... i am stuck in this problem since 3 days now....deadline is near and the problem is still there..... please please help/guide/suggest..... i am using tiles...everything seems to be configgured corectly.... but still the problems is same

  10. @Anon with deadline:
    Try stackoverflow, that website usually helps better then asking random bloggers for help

  11. Thanks a lot for this helpful resource

  12. Thanks a lot for this helpful resource dude....

  13. 3rd solution works!!!!

  14. +2
    even I was getting the same error and problem gt solved by adding

    < param name> chainConfig ...

    in Web.xml for action ..

    Thanks to Jonathan & others

  15. Even if you have space in front of definition name also then this error will occur.
    like this