cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jos Snellings <>
Subject mount named blocks inconvenience
Date Thu, 10 May 2012 11:05:05 GMT
Dear cocooners,

1. In the definition of a named block, for:
    <servlet:context mount-path="/foo" context-path="blockcontext:/foo/"/>

This tells the cocoon servlet that a block "foo" is mounted on "foo" in the

2. sitemap.xmap
  An empty matcher like in the cocoon sample:
 <map:match pattern="">
            <map:read src="welcome.html" mime-type="text/html"/>

3. call

   or, the root of the block. (it is configured correctly, all the rest

EVENT:  exception:

For named blocks
java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at
java.lang.String.charAt( at

Without having it investigated in extenso, it seems that when blocks are
named, so not mounted as 'root block', that there is a problem with
String testValue = resolvedValue == null
                ? null : resolvedValue.toString();
        if (testValue == null) {
            testValue = invocation.getRequestURI();
            if (testValue.charAt(0) == '/') {
                testValue = testValue.substring(1);
The value is null.

By the way,
nicely produces the expected welcome page.

Anyone knows this problem?

Kind regards,

The doctrine of human equality reposes on this: that there is no man
really clever who has not found that he is stupid.
        -- Gilbert K. Chesterson

View raw message