Possible Duplicate:
How to get the client IP?
How to get ip of the client in Play! framework 2.0? Is something implemented in Play? Any help, advices? I'm writing apps in Java.
In Play 2.0's action you can get lot of data from Http.RequestHeader it can be fetched like this:
public static Result index() {
String remote = request().remoteAddress();
return ok(remote);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With