cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Weber (JIRA)" <>
Subject [jira] Created: (COCOON-2096) <map:when test="servlet:servlet:/path/to/file> always returns true
Date Mon, 23 Jul 2007 16:13:31 GMT
<map:when test="servlet:servlet:/path/to/file> always returns true

                 Key: COCOON-2096
             Project: Cocoon
          Issue Type: Bug
          Components: - Components: Sitemap
    Affects Versions: 2.2-dev (Current SVN)
            Reporter: Alexander Weber

sitemap from myBlock1-the filename.txt exist at resource/external/filename.txt - the myBlock2
is a bean id - myBlock3 id does not exist or the file does not exists in myBlock3:

       <map:match pattern="filename.txt">
         <map:select type="resource-exists">
           <map:when test="servlet:myBlock3:resource/external/filename.txt">
             <map:read src="servlet:myBlock3:resource/external/filename.txt"/>
             <map:read src="servlet:myBlock2:/resource/external/filename.txt"/>

Since myBlock3 does not exist, i am expecting that "test=" returns false and
map:otherwise is used. But unfortunately it _always_ returns true. It is
acting as if the "servlet:myBlock3:" part is completely ignored. 

Grzegorz reported back on the User-maillist:
Alex, I've just checked sources of servlet: protocl (source) that it looks[1] like this:

         * Returns true always.
         * @see org.apache.excalibur.source.Source#exists()
        public boolean exists() {
                return true;

reported on maillist:

Alexander Weber

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message