§Main concepts for Java
This section introduces you to the most common aspects of writing a Play application in Java. You’ll learn about handling HTTP requests, sending HTTP responses, working with different types of data, using databases and much more.
Note: The Play APIs for Java and Scala are separated into different packages. All the Java APIs are under the
play
package; all the Scala APIs are underplay.api
. For example, the Java MVC API is underplay.mvc
and the Scala MVC API is underplay.api.mvc
.
HTTP programming
- Actions, Controllers and Results
- HTTP routing
- Manipulating the HTTP response
- Session and Flash scopes
- Body parsers
- Actions composition
- HTTP Request Handlers / ActionCreator
- Content negotiation
Asynchronous HTTP programming
The Twirl template engine
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
Dependency Injection
Application Settings
Testing your application
- Writing tests
- Writing functional tests
- Testing with Guice
- Testing with databases
- Testing web service clients
Logging
Next: HTTP programming
Found an error in this documentation? The source code for this page can be found here. After reading the documentation guidelines, please feel free to contribute a pull request. Have questions or advice to share? Go to our community forums to start a conversation with the community.