English 中文(简体)
如何在铁路中找到连接客户的电子地址
原标题:How to find out Connected Clients Ip Address in grails

我正在开展小型铁路项目。 我正试图在这些项目中增加网络概念,以便指导如何开展工作。

www.un.org/Depts/DGACM/index_spanish.htm 要求:-

我正在我的当地东道主(http:// localhost:8080/xyz)主持我的项目。 因此,如果另一人与同一地方东道方接触该项目(http://192.168.x:8080/xyz)。 通过使用网络概念,一应当获得使用同一当地东道方(IP地址)的特定用户地址的细节。

目前,我正在利用这一询问来获得我系统的IP地址。

${request.getScheme()}:${InetAddress.getLocalHost().getHostAddress()}

但是,我想到网络使用该项目的特定用户的IP地址。

请指导我解决这一问题。

最佳回答

你应该能够利用:

String addr = request.remoteAddr
问题回答

暂无回答




相关问题
Groovy - how to exit each loop?

I m new to Grails/Groovy and am trying to find a node in a an xml file; I ve figured out how to iterate over all of them, but I want to exit the loop when the target node is found. I ve read that ...

Eclipse Spring Builder set properties with Groovy beans

I typically use groovy to construct simple bean but the Spring IDE plugin to eclipse fails to build when I try to set a property that is generated by groovy without an explicit setter. For example, ...

How can I get this snippet to work?

I d like to port a little piece of code from Ruby to Groovy, and I m stuck at this: def given(array,closure) { closure.delegate = array closure() } given([1,2,3,4]) { findAll { it > 4} ...

Changing the value in a map in Groovy

This is about a very basic program I m writing in Groovy. I have defined a map inside a method: def addItem() { print("Enter the item name: ") def itemName = reader.readLine() print(...

Is functional Clojure or imperative Groovy more readable?

OK, no cheating now. No, really, take a minute or two and try this out. What does "positions" do? Edit: simplified according to cgrand s suggestion. (defn redux [[current next] flag] [(if flag ...

热门标签