【发布时间】:2012-12-24 16:01:43
【问题描述】:
我在我的项目中写了Rest web service。web service调用可能来自不同的机器。所以我需要通过REST webservice找出IP地址。
从这个link request.getRemoteAddr() 使用这个。
但我不能使用 getRemoteAddr()。因为我的请求和响应都是xml格式的。
我在 REST 服务中使用了 post 方法。Tomcat 服务器。我以 xml 格式发送请求。
如何获取IP地址?
【问题讨论】:
-
您能说出您使用的是什么技术/框架吗?
标签: java web-services rest restful-authentication