Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-551

IncludeNotFound event handler not including the "notfound" page

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.6
    • Engine
    • None
    • Linux (Fedora Core 5) / OSX 10.4.9
      Java 6
      Tomcat 6.0.10
      Struts2

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mtoneman Michiel Toneman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: