on 05-26-2008 12:08 PM
Dear Experts,
Can u give ur suggesions retriving client ip of the machine who log in portal.
try
{
InetAddress localHost = InetAddress.getLocalHost();
InetAddress[] all_IPs = InetAddress.getAllByName(localHost.getHostName());
for (int w=0; w<all_IPs.length; w++) {
System.out.println("IP address = " + all_IPs[w]);
wdComponentAPI.getMessageManager().reportSuccess(WDClientUser.getLoggedInClientUser().getFirstName());
}
}catch (Exception e) {
// TODO: handle exception
wdComponentAPI.getMessageManager().raiseException("Unable to get IP",false);
}
From above code i'm getting portal server ip.Iwant dynamic client system ip.In ABAP System we're getting IP From AL08 TCODE.But how in webdynpro java.
Thanks ,
Santhosh
Hi,
Following code will help you
String ipAddress = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress();
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I set the sapauthentication property of that application as true and i configured that appilcation as URL iview .Presently i'm getting Client IP.
Thanks,
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ayyapparaj,
Thanks for ur rpl.That Code is working.Actually we're using SAP Webdispatcher.That's why i'm getting Server ip.Can u suggest how can i proceed this scenario.If i give the port number,Client IP Is retriving.
Thanks,
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
what i mean is i need to get system ip of who ever accesing webdynpro iview from portal.If i work with above code i'm getting server ip.My portal is intranet portal.
I hope u got my point.If any doubt let me know.
Thanks for ur quick rpl.
Thanks,
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ayyapparaj,
I tried with the same code.that is retriving server ip .I need Activer user IP who log in portal throgh webdynpro java application.
Iwill provide the points.It's urgent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I also tried the same code.. whenever i am running application from NWDS it is giving ip address of client.
If i try the same after creating an iview of application in portal and view with mozilla it is giving client ip address.
if i try with IE with a full portal url (along with port number 50300) it is giving client address. Otherwise(without port number) it is giving server ip address.
Is it require any other setting in dispatcher?
Regards
Baby
Edited by: Baby on May 27, 2008 12:17 PM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.