on 01-08-2016 10:14 AM
Hi ,
We have a requirement to be capture end user Pc's IP address through webdynpro java application.
Used below code for capturing IP addres, It's working fine in Webdynpro Java 7.0.but not working in Webdynpro Java 7.3.
HttpServletRequest req=(HttpServletRequest)TaskBinder.getcurrentTask().getProtocolAdapter().getRequestObjectInternal().getProtocolRequest();
req.getHeader("X-Forwarded_For);
Thanks,
Srinivas
Hi Srinivas,
Please use this code you can get the IP in WDJ applications
IWDRequest req = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
String hostAddress = req.getClientHostAddress();
Regards,
Durga Rao.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works on 7.4 portal in Masthead.jsp:
currentRequest.getServletRequest().getHeader("x-forwarded-for")
Regards,
Gary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.