Open PerfectCarl opened 11 years ago
One way is to change the default 404 page to refer to a japid version, eg: (in app/views/errors/404.html)
<html>
<head>
<title>Not found</title>
</head>
<body>
#{if play.mode.name() == 'DEV'}
#{404 result /}
#{/if}
#{else}
${cn.bran.play.JapidPlayRenderer.renderWith("japidviews.error404").raw()}
#{/else}
</body>
</html>
Then do whatever you want with an Japid based "error404.html" in you japidviews folder.
The above example let your Japid 404 page to handle 404 in prod mode.
Play lets us override the default page hander for 404 and 500 errors.
views/errors/404.html
views/errors/500.html
What is the japid way to do it ?