You are viewing the documentation for the 2.5.x release series. The latest stable release series is 3.0.x.

§Main concepts for Scala

This section introduces you to the most common aspects of writing a Play application in Scala. 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 Scala and Java are separated into different packages. All the Scala APIs are under the play.api package; all the Java APIs are under play. For example, the Scala MVC API is under play.api.mvc and the Java MVC API is under play.mvc.

HTTP programming

  1. Actions, Controllers and Results
  2. HTTP Routing
  3. Manipulating results
  4. Session and Flash scopes
  5. Body parsers
  6. Actions composition
  7. Content negotiation
  8. Handling errors

Asynchronous HTTP programming

  1. Asynchronous results
  2. Streaming HTTP responses
  3. Comet
  4. WebSockets

The Twirl template engine

  1. Scala templates syntax
  2. Common use cases
  3. Custom format

Form submission and validation

  1. Handling form submission
  2. Protecting against CSRF
  3. Custom Validations
  4. Custom Field Constructors

Working with Json

  1. JSON basics
  2. JSON with HTTP
  3. JSON Reads/Writes/Format Combinators
  4. JSON automated mapping
  5. JSON Transformers

Working with XML

  1. Handling and serving XML requests

Handling file upload

  1. Direct upload and multipart/form-data

Accessing an SQL database

  1. Configuring and using JDBC
  2. Using Slick to access your database
    1. Using Play Slick
    2. Play Slick migration guide
    3. Play Slick advanced topics
    4. Play Slick FAQ
  3. Using Anorm to access your database

Using the Cache

  1. Using the Cache

Calling WebServices

  1. The Play WS API
  2. Connecting to OpenID services
  3. Accessing resources protected by OAuth

Integrating with Akka

  1. Integrating with Akka


  1. Internationalization

Dependency injection

  1. Runtime dependency injection
  2. Compile time dependency injection

Application Settings

  1. Application Settings
  2. HTTP request handlers
  3. Essential Actions
  4. HTTP filters

Testing your application

  1. Testing your Application
  2. Testing with ScalaTest
  3. Writing functional tests with ScalaTest
  4. Testing with specs2
  5. Writing functional tests with specs2
  6. Testing with Guice
  7. Testing with databases
  8. Testing web service clients


  1. 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.