Route to static file in Play! 2.0

IIRC, change <link rel=”stylesheet” media=”screen” href=”https://stackoverflow.com/questions/9792875/@routes.Assets.at(“stylesheets/main.css”)”> To <link rel=”stylesheet” media=”screen” href=”https://stackoverflow.com/questions/9792875/@routes.Assets.at(“stylesheets/”, “main.css”)”> I am talking about your third attempt Also, watch out for extra / EDIT GET /assets/main.css controllers.Assets.at(path=”/public”, file=”/stylesheets/main.css”) Assuming your resource is at /public/stylesheets/main.css

How to make the debugging in playframework in IntelliJ Idea

Most convenient way to run/debug applications in intellij IDEA is the following. Menu command: Run -> Edit Configuration! Add new configuration -> Application Then fill up the fields: Main class: play.server.Server VM Parameters: -Dapplication.path=. You should have something similar: If you did it correctly, then you can run and stop your app right from IDE … Read more

Should authorization be part of the model or controller?

I think this is a grey area. One could argue that the user access is part of the mapping between the HTTP world and the Object-Oriented world. This is what the controller is intended for (hence the heavy use of statics), to transform the incoming request, ready to process the business rules on the domain … Read more

How to integrate Play Framework 2.0 into Gradle build management using Maven dependencies?

This is a very tricky business. SBT in Play is used for fetching dependencies, compiling source and templates, and for the SBT incremental compilation + auto-reloading feature. I have written a build.gradle script to resolve all Play 2.0 dependencies and set-up Eclipse or IntelliJ IDEA classpaths, and made it public here. I will try to … Read more

tech