Play Framework tips

How to output HTML code in Scala template ?

By default, HTML tags are escaped. To return not escaped HTML content, we need to pass by @Html method: @Html(""+variableFromController+"") ...

Continue Reading →

How to generate full URL ?

Normal URL generation, with simple @controllers.routes.UserController.login, generates only relative URI (such as /login.html). To generate full URL, with host and protocol, we could use absoluteURL()...

Continue Reading →