set http status to 404 on not-founds

This commit is contained in:
hns 2001-05-20 13:10:25 +00:00
parent 22252c0b7b
commit 8bbd32f01c

View file

@ -285,6 +285,7 @@ public class RequestEvaluator implements Runnable {
throw new RuntimeException ();
// The path could not be resolved. Check if there is a "not found" action
// specified in the property file.
res.status = 404;
String notFoundAction = app.props.getProperty ("notFound", "notfound");
Prototype p = app.getPrototype (root);
action = p.getActionOrTemplate (notFoundAction);
@ -305,7 +306,7 @@ public class RequestEvaluator implements Runnable {
}
localrtx.timer.endEvent (requestPath+" execute");
} catch (RedirectException redirect) {
res.redirect = redirect.getMessage ();
// res.redirect = redirect.getMessage ();
// if there is a message set, save it on the user object for the next request
if (res.message != null)
user.message = res.message;