You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <de...@velocity.apache.org> on 2007/06/05 05:53:26 UTC
[jira] Resolved: (VELOCITY-551) IncludeNotFound event handler not
including the "notfound" page
[ https://issues.apache.org/jira/browse/VELOCITY-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Will Glass-Husain resolved VELOCITY-551.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.6
Patch applied. The odd thing is, we had a unit test for this but the unit test was wrong. Thanks for catching it.
> IncludeNotFound event handler not including the "notfound" page
> ---------------------------------------------------------------
>
> Key: VELOCITY-551
> URL: https://issues.apache.org/jira/browse/VELOCITY-551
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.5
> Environment: Linux (Fedora Core 5) / OSX 10.4.9
> Java 6
> Tomcat 6.0.10
> Struts2
> Reporter: Michiel Toneman
> Fix For: 1.6
>
>
> The IncludeNotFound event handler claims in the log "Can't find include not found
> page: " even though the "notfound" page exists.
> I've tracked this in the source:
> ------------------------------------------------
> boolean exists = (rs.getLoaderNameForResource(includeResourcePath) != null);
> if (!exists)
> {
> if (rs.getLoaderNameForResource(notfound) == null)
> {
> return notfound;
> }
> else
> {
> /**
> * can't find not found, so display nothing
> */
> rs.getLog().error("Can't find include not found page:
> " + notfound);
> return null;
> }
> }
> else
> return includeResourcePath;
> ---------------------------------------------------
> I think the condition:
> if (rs.getLoaderNameForResource(notfound) == null)
> should read:
> if (rs.getLoaderNameForResource(notfound) != null)
> Changing this fixed the problem for me.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org