Q:

Play 2.X ScalaRouting Boolean Parameter

How can I use boolean in route definition?
If I use this way,
GET     /user/:userName   controllers.AppController.user(userName, registerDone:Boolean?=0)

it throws this error:

[error]  found   : Int(0)
[error]  required: Boolean

If I use this way,
GET     /user/:userName   controllers.AppController.user(userName, registerDone:Boolean?=false)

it throws this error:

bad request at: /user/aajjblack?registerDone=true, Cannot parse
  parameter registerDone as Boolean: should be 0 or 1

Controller:
public static Result user(final String userName, Boolean registerDone) {
}

A:

Use... Int instead
GET  /user/:userName  controllers.AppController.user(userName, registerDone: Int?=0)

action:
public static Result user(final String userName, int registerDone) {
    if(registerDone == 0){
        return badRequest();
    }

    // do something with registered user...
    return ok();
}

It's simplest replace of any kind  of booleans, as you can just check if registerDone is bigger than 0 (and it still keeps type-safety).

