[
http://issues.apache.org/jira/browse/COCOON-1542?page=comments#action_12359173
]
Tim Williams commented on COCOON-1542:
--------------------------------------
Copied over from Bugzilla...
Wrapping it would help in that we would get an understandable message in return.
Why even try to resolve the src attribute if it's a null value? In other
words, why not check for a null value prior to even attempting the resolution?
Is this behavior (""==sitemaprootdir) expected/required in other parts of
Cocoon?
Thanks,
--tim
> File generator resolves to root context with empty src attribute
> ----------------------------------------------------------------
>
> Key: COCOON-1542
> URL: http://issues.apache.org/jira/browse/COCOON-1542
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Versions: 2.2-dev (Current SVN)
> Environment: Operating System: All
> Platform: PC
> Reporter: Tim Williams
> Assignee: Cocoon Developers Team
> Priority: Minor
>
> When passing an empty string/null value to a file generator's "src"
> attribute, it seems to resolve to the root context (sitemap
> directory).
> For example,
> <map:match pattern="**tab-*.html">
> <map:select type="exists">
> <map:when test="{project:content.xdocs}tabs.xml">
> <map:generate src="{project:content.xdocs}tabs.xml"/>
> </map:when>
> <map:otherwise>
> <map:generate src="{lm:tabs.xml}"/>
> </map:otherwise>
> </map:select>
> ...
> In the above snippet, {lm:tabs.xml} returns null but the generator
> resolves to (on my box) "C:\src\apache-forrest-lm\main\webapp" which
> throws an Access Denied exception. What I would have expected is a
> SourceNotFoundException because, after all, an empty source couldn't
> be found.
> Discussion was here:
> http://marc.theaimsgroup.com/?t=111996379000002&r=1&w=2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira