Problem:
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>
Solution:
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.
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:
ReplyDelete<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>
More info:
http://struts.apache.org/1.3.8/struts-tiles/installation.html
it worked really,thanks
DeleteThis also can happen when you include files into the tile layout.
ReplyDeleteFile which has compilation error! I know this is dumb but took me 2 ours to get it...
C:out
thanks for the note.
ReplyDeleteJonathan you are right, I correct my problem using the information of your post. Thanks!!!
ReplyDeleteThis can also happen if you misspell the name in the put tag.
ReplyDeleteREGARDS.
can also happen if the following value param in the tiles plug-in node in web.xml is misconfigured:
ReplyDelete<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
</plug-in>
That error may append if you migrate from struts 1.2 to struts 1.3.
ReplyDeleteSee this URL for the solution:
http://rajeshpg.com/2007/01/23/javaxservletservletexception-path-loginlayout-does-not-start-with-a-character/
problem solved by adding
ReplyDeletetiles plug-in node in web.xml.
+1 ; problem solved by adding
ReplyDeletetiles plug-in node in web.xml.
Hi.
ReplyDeleteI 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
@Anon with deadline:
ReplyDeleteTry stackoverflow, that website usually helps better then asking random bloggers for help
Thanks a lot for this helpful resource
ReplyDeletethanx
ReplyDeleteThanks a lot for this helpful resource dude....
ReplyDelete3rd solution works!!!!
ReplyDelete+2
ReplyDeleteeven I was getting the same error and problem gt solved by adding
< param name> chainConfig ...
in Web.xml for action ..
Thanks to Jonathan & others
Even if you have space in front of definition name also then this error will occur.
ReplyDeletelike this