Due to how reverse routing works, you need to specify both parameters to use account. Here is an example that works:
In Application.scala:
def account(userId: String, date: String) = Action {
Ok(userId + " and " + date)
}
In routes:
GET /order/:userId controllers.Application.account(userId, date="")
GET /order/:userId/:date controllers.Application.account(userId, date)
source
share