It is often useful to mark the request parameter as implicit so it can be implicitely used by other APIs that need it:
Action { implicit request =>
Ok("Got request [" + request + "]")
}If you're using Play for Java, you can do something this:
<li @if(requestHeader.uri == routes.Help.index.url){class="active"}>
Just ignore the error in your ide, it compiles and run well.
The requestHeader method was import automatically by class play.TemplateImports:
javaImports.add("play.core.j.PlayMagicForJava._");