Emilla
Emilla

Reputation: 494

How to customize page not found error and internal error for 404 and 500 pages in play framework 1.2.x

I would like to direct the request to the page not found page (404.html) if url doesn't match a route and action. And also I would like to show a proper message page (500.html) if an error occured. I really could not get a clear answer from my searching in plays tutorial even.

Upvotes: 0

Views: 184

Answers (1)

mkurz
mkurz

Reputation: 2826

Play 1.2.x already handles "Page not found" (404) and Application Errors (500) automatically! You don't have to configure anything, it works out of the box.

Have a look in the folder app/views/errors/, here you can find the default 404.html and 500.html. You can customize them for your needs.

Upvotes: 1

Related Questions