How can I get the client IP in a JSR168 Portlet?

Posted by danimajo on Stack Overflow See other posts from Stack Overflow or by danimajo
Published on 2010-04-23T13:13:44Z Indexed on 2010/04/23 13:33 UTC
Read the original article Hit count: 218

Filed under:

How can I get the IP of the Client (request) in a JSR168 Portlet?

I'm on Liferay 5.2.3

I can get the IP with Liferay internal functionality:

String ip = com.liferay.portal.util.PortalUtil.getHttpServletRequest(renderRequest).getRemoteAddr();

Is there any portal neutral way to do this?

© Stack Overflow or respective owner

Related posts about liferay