You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Tim Williams <wi...@gmail.com> on 2006/06/23 20:31:59 UTC

Rewrites with locationmap (e.g. FOR-705)

RE:  http://issues.apache.org/jira/browse/FOR-705

As I described in my last comment on FOR-705, the root cause of the
rewrites failing is that they are defined in a project-level location
map that happens to be mounted inside a selector of the forrest
locationmap.  This causes any results coming out of a project level
locationmap to go through the selector.  This is not a big deal for
most uses of the locationmap, but when it's used for rewrites, it
causes bad things to happen.

To quickly test this idea, I added this to the SelectNode:
              if (m_nodes[i].getClass().getName() ==
"org.apache.forrest.locationmap.lm.MountNode") {
                  return location;
              }

which causes it to blindly return any result coming out of a MountNode
instead of running it through the selector.  With this snippet, it
works as [I think] it should.

Any issues with this?
Thanks,
--tim