I am doing small project on grails. I am trying to add networking concepts in this projects can u please guide how to work on it
Requirement:-
I am running my project in my localhost(http://localhost:8080/xyz).So if another person is accessing the project with the same localhost(http://192.168.x.x:8080/xyz).By using the networki开发者_StackOverflowng concept i should get the details of that particular users ip address who using with the same localhost (IP address).
currently i am using this query to get IP address of my system
${request.getScheme()}:${InetAddress.getLocalHost().getHostAddress()}
but i want IP address of particular user who are using this project in network.
please guide me to solve this problem.
You should just be able to use:
String addr = request.remoteAddr
精彩评论