O'Reilly logo

Learning Play! Framework 2 by Andy Petrella

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

Understanding the core pieces

In this section, we'll have a good time looking into the files that have been generated while creating our project.

First of all, we should wonder what is responsible for taking a URL and deciding what is to be done with it. That's done through routing.

Routing

As discussed earlier, we went to the root path of our running application (http://localhost:9000/). What we got was an HTML page containing information and links to some documentation—the welcome page.

What happened is that the browser took a URL and sent a GET request targeting the / path of our server.

At this stage, Play! Framework 2 enters the game; it will try to find an action somehow related to the received request using two pieces of information: a method ...

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