forked from playframework/playframework
-
Notifications
You must be signed in to change notification settings - Fork 0
JavaInterceptors
Guillaume Bort edited this page Feb 10, 2012
·
7 revisions
One another important aspect of the GlobalSettings class is that it provides a way to intercept requests and execute some business logic before a request is being dispatched to an Action.
Let's see this in action:
import play.*;
public class Global extends GlobalSettings {
@Override
public Action onRequest(Request request, Method actionMethod) {
System.out.println("before each request..."+request.toString());
return super.onRequest(request,actionMethod);;
}
}Next: Testing your application
- HTTP programming
- Asynchronous HTTP programming
- The template engine
- HTTP form submission and validation
- Working with JSON
- Working with XML
- Handling file upload
- Accessing an SQL database
- Using the Cache
- Calling WebServices
- Integrating with Akka
- Internationalization
- The application Global object
- Testing your application