set http status to 404 on not-founds
This commit is contained in:
parent
22252c0b7b
commit
8bbd32f01c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue