Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a controller for a 404 page (Play! Framework)

I am working with Play! Framework 1.2.4 and have no problems creating static 404 pages. However, I would like to make the 404 page a little more dynamic.

Is there a "controller" for a 404 page? If not, where do I do all my logic that would traditionally go in the controller?

like image 310
Steve Avatar asked Sep 03 '12 05:09

Steve


1 Answers

There is no controller for a 404 page. Play try to find a route and if this is not possible throw a NotFound Result that shows the 404 page.

You may create a catch all controller that do this job so this controller will handle the 404 case instead of Play itself.

 *       /.*     NotFoundRouter.notFoundPage
like image 181
Seb Cesbron Avatar answered Oct 06 '22 22:10

Seb Cesbron