Scalatra is a simple, accessible and free web micro-framework.

It combines the power of the JVM with the beauty and brevity of Scala, helping you quickly build high-performance web sites and APIs.

Ready

Get set up in 2 easy steps with our quick installation guide. There's a good chance that you already have most of the software you need.

Get started »

Steady

We've documented the main aspects of Scalatra development in a handy set of reference guides, to help you become productive quickly.

View the guides »

Code

We have a very active community, and an enthusiastic group of developers working on the next version.

Get involved »

Project news

Why would you want to use Scalatra?

  • It's been proven in production - the BBC, the Guardian newspaper, Box.com, Netflix, and McLaren all rely on it.
  • It can help you quickly build high-performance, scalable HTTP APIs for web and mobile applications.
  • It's a perfect server-side counterpart to in-browser client development frameworks such as backbone.js, ember.js or angular.js.
  • It's a simple, fun, and practical way to learn Scala, a new programming language with advanced features.
  • It will help you use all available cores of that new 16-core server. It also gives you easy access to Scala's new concurrency-management constructs: Akka Actors.

We've got a book!

Order Scalatra in Action as part of the Manning Early Access Program (MEAP).

Written by members of the Scalatra team, the book walks you through the entire framework, from first steps to servlet deployment.

Start small

You will need to install a few things before you can get started, but first, here's a Scalatra app:

package com.example.app
import org.scalatra._

class HelloWorldApp extends ScalatraFilter {
  get("/") {
    <h1>Hello, {params("name")}</h1>
  }
}

Notice a few things about it:

This is the essence of Scalatra - a simple, easy to understand way to make web systems, which embraces HTTP's stateless nature. You can build anything you want with Scalatra, but one of the things it's been most successful at is the construction of RESTful APIs.

Scale up and customize

Scalatra is a micro-framework, so you start small and build upwards.

You can easily add exactly the libraries you want - for data models, templating, unit and integration testing, async request handling, or server-push.

We can't predict what you'll want to build, or how you'll want to build it. Instead of prescribing a set of libraries for you to use, and building the framework around that, we let you choose.

Versions

Scalatra Version Status Source Scala versions Servlet
3.1.0 Stable 3.1.0
  • 2.12.x
  • 2.13.x
  • 3.3.x
4.0.1 / 6.0.0
3.0.0 Stable 3.0.0
  • 2.12.x
  • 2.13.x
  • 3.3.x
4.0.1 / 5.0.0
2.8.4 Stable 2.8.4
  • 2.12.x
  • 2.13.x
3.1
2.7.1 Stable 2.7.1
  • 2.11.x
  • 2.12.x
  • 2.13.x
3.1
2.6.5 Stable 2.6.5
  • 2.11.x
  • 2.12.x
3.1
2.5.4 Stable 2.5.4
  • 2.11.x
  • 2.12.x
3.1
2.4.1 Stable 2.4.1
  • 2.10.x
  • 2.11.x
3.1
2.3.2 Stable 2.3.2
  • 2.10.x
  • 2.11.x
3.1