Is there any way to get client IP address inside struts2 action method?
I have implemented interfaces SesionAwareand RequestAware, but these two insert only session and request cards.
SesionAware
RequestAware
Have you tried ServletRequestAware ?
Try request.getRemoteAddress (). This will give you the client IP address. If the request goes through a proxy server, then you will only get the proxy server ip.
ServletRequest.getRemoteAddress() API, IP- . API Servlet, Struts2.
Source: https://habr.com/ru/post/1770595/More articles:How can I exclude an exception from reports as not displayed in the BlackBerry application? - exceptionКак проверить абстрактный абстрактный класс? - c#SharePoint 2010 - List View Threshold: What Does Not Cause a Threshold? - listКак сохранить состояние приложения (значения переменных, состояния кнопок и т.д.) В приложении Windows Phone 7 Silverlight? - windows-phone-7How do you view class files in Eclipse explorer? - javaDynamic Linq - request a schema that is known only at runtime? - linq-to-sqlHow to make a line in titanium? - androidhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1770598/determine-which-unit-tests-to-run-based-on-diffs&usg=ALkJrhhWF6KS4AQMyLqeVEdQRpwB-PtPGACocoa - Open batch file in Finder - cocoaUse Unmanaged FindFirstVolume to List .NET Volumes in C # - c #All Articles