always returns true
Posted by "Grzegorz Kossakowski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COCOON-2096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grzegorz Kossakowski reassigned COCOON-2096:
--------------------------------------------
Assignee: Grzegorz Kossakowski
> <map:when test="servlet:servlet:/path/to/file> always returns true
> ------------------------------------------------------------------
>
> Key: COCOON-2096
> URL: https://issues.apache.org/jira/browse/COCOON-2096
> Project: Cocoon
> Issue Type: Bug
> Components: - Components: Sitemap
> Affects Versions: 2.2-dev (Current SVN)
> Reporter: Alexander Weber
> Assignee: Grzegorz Kossakowski
>
> 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:when>
> <map:otherwise>
> <map:read src="servlet:myBlock2:/resource/external/filename.txt"/>
> </map:otherwise>
> </map:select>
> </map:match>
> 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:
> [quote]
> 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;
> }
> [/quote]
> reported on maillist: http://www.nabble.com/-cocoon-2.2.x--site-can-check-for-file-exists--t4040666.html
> Alexander Weber
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (COCOON-2096) Servlet source's exists() method
always returns true
Posted by "Grzegorz Kossakowski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COCOON-2096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524388 ]
Grzegorz Kossakowski commented on COCOON-2096:
----------------------------------------------
FYI: I'm going to fix this issue before next release (not sure if M3 or RC1) of cocoon-servlet-service, see http://article.gmane.org/gmane.text.xml.cocoon.devel/74996
> Servlet source's exists() method always returns true
> ----------------------------------------------------
>
> Key: COCOON-2096
> URL: https://issues.apache.org/jira/browse/COCOON-2096
> Project: Cocoon
> Issue Type: Bug
> Components: - Servlet service framework
> Affects Versions: 2.2-dev (Current SVN)
> Reporter: Alexander Weber
> Assignee: Grzegorz Kossakowski
>
> 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:when>
> <map:otherwise>
> <map:read src="servlet:myBlock2:/resource/external/filename.txt"/>
> </map:otherwise>
> </map:select>
> </map:match>
> 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:
> [quote]
> 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;
> }
> [/quote]
> reported on maillist: http://www.nabble.com/-cocoon-2.2.x--site-can-check-for-file-exists--t4040666.html
> Alexander Weber
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.