Reputation: 67
just wondering if there is an equal for HandlerInterceptor in Play?
" preHandle() – Called before the handler execution, returns a boolean value, “true” : continue the handler execution chain; “false”, stop the execution chain and return it. postHandle() – Called after the handler execution, allow manipulate the ModelAndView object before render it to view page. afterCompletion() – Called after the complete request has finished. Seldom use, cant find any use case."
Upvotes: 0
Views: 115
Reputation: 11479
You could do that kind of things in two ways with play. With a "filter" or with a custom "onRouteRequest"-method in your global object.
Read more here: http://www.playframework.com/documentation/2.1.x/ScalaInterceptors
Upvotes: 1