diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 7241b186..900c9076 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -150,13 +150,15 @@ public final class RequestEvaluator implements Runnable { res.message = session.message; session.message = null; } + Map macroHandlers = res.getMacroHandlers (); try { if (error != null) { // there was an error in the previous loop, call error handler currentElement = root; - requestPath.add (currentElement); + // do not reset the requestPath so error handler can use the original one + // get error handler action String errorAction = app.props.getProperty ("error", "error"); action = getAction (currentElement, errorAction); if (action == null) @@ -165,6 +167,7 @@ public final class RequestEvaluator implements Runnable { } else if (req.path == null || "".equals (req.path.trim ())) { currentElement = root; requestPath.add (currentElement); + macroHandlers.put ("root", root); action = getAction (currentElement, null); if (action == null) throw new FrameworkException ("Action not found"); @@ -183,12 +186,16 @@ public final class RequestEvaluator implements Runnable { currentElement = root; requestPath.add (currentElement); + macroHandlers.put ("root", root); for (int i=0; i