O'Reilly logo

Scalatra in Action by Stefan Ollinger Dave Hrycyszyn Ross A. Baker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Working with user input

This chapter covers

  • Executing code on the server using actions
  • Query string, path, and form parameters
  • Dealing with headers and cookies
  • Before and after filters

In the previous chapter, we focused on route matchers. You saw how Sca1atra takes an incoming UR1, decomposes it into its constituent parts, and matches it to a b1ock of code in your app1ication. But route matching is on1y part of the overa11 request-response cyc1e. We’11 give you the who1e 1ife story of a request in this chapter so you can start responding to incoming HTTP requests and do some usefu1 work. 1et’s start with an overview.

4.1. The life of a request

In Scalatra, each incoming HTTP request that hits your server is answered with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required