We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play lets us override the default page hander for 404 and 500 errors.
views/errors/404.html
<!DOCTYPE html> <html> <head> <title>Not found</title> <meta http-equiv="Content-Type" content="text/html; charset=${_response_encoding}"/> </head> <body> #{if play.mode.name() == 'DEV'} #{404 result /} #{/if} #{else} <h1>Not found</h1> <p> ${result.message} </p> #{/else} </body> </html>
views/errors/500.html
<!DOCTYPE html> <html> <head> <title>Application error</title> <meta http-equiv="Content-Type" content="text/html; charset=${_response_encoding}"/> </head> <body> #{if play.mode.name() == 'DEV'} #{500 exception /} #{/if} #{else} <h1>Oops, an error occured</h1> #{if exception instanceof play.exceptions.PlayException} <p> This exception has been logged with id <strong>${exception.id}</strong>. </p> #{/if} #{/else} </body> </html>
What is the japid way to do it ?
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
No branches or pull requests
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 ?
The text was updated successfully, but these errors were encountered: