Hi Michiel--

Thanks for finding this!

Would you mind opening a JIRA issue for this at
http://issues.apache.org/jira?

I'll patch our source code tree tonight with this fix.

WILL


On 5/31/07, Michiel Toneman <[EMAIL PROTECTED]> wrote:

Hi All,

I was just trying out the IncludeNotFound event handler and was not
successful in getting my "notfound" page to load (when I was sure
velocity could find it, I was getting "Can't find include not found
page: " in the logs). Digging into the source, it reads:

------------------------------------------------
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)

Cheers,

Michiel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

Reply via email to