Get client IP address

Hi ,
I need to get IP address of the client(user) not server. I tried with these codes, both these returned IP address of the server but not client. Is there any other way? Please help.
1)     try{
          InetAddress thisIp =InetAddress.getLocalHost();
          String IPAddress = thisIp.getHostAddress();
          wdContext.currentContextElement().setIp(IPAddress);
     }catch(Exception ee){
2)
       IWDRequest request = WDProtocolAdapter.getProtocolAdapter() .getRequestObject() ;
     String ip=  request.getClientHostAddress();
Thanks,
Jai

Hi Jai,
Your #1 method won't work because it gets the localHost which is the app server.
Your #2 method should work, try this
String ip = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress();
and debug to see what value gets there.
Hope it helps,
Dao

Similar Messages

  • How can I get Client IP Address in oracle?senthil

    How can I get Client IP Address in oracle?senthil

    Hi,
    Following query can help you to get the Client IP Address.
    select sys_context('userenv','ip_address') from dual;
    Thanks,

  • How can I get client IP address in portlet (servlet) ?

    How can I get client IP address in portlet (servlet) ?
    request.getRemoteAddr() return server IP.
    May be I must use Portal API, which extend Servlet classes, but I can't find this.
    Can any help me?

    Hi,
    Following query can help you to get the Client IP Address.
    select sys_context('userenv','ip_address') from dual;
    Thanks,

  • How to get Client IP address in oracle apps. Are there any API's.

    hi,
    I have one query
    ->How to get Client IP address in oracle apps. Are there any API's.
    regards,
    krishna

    Hi,
    this is very usefull
    however are this data stored on the db or is only a temporary view?
    I would like to have to keep track of all client connected.
    Thanx a lot

  • How to i get client IP address of a system on Oracle E-biz

    We are trying to extend our audit to getting the client IP address of a system on Oracle E-biz. This is to track down some users trying to perform a fraudulent act. Anybody has an idea. Maybe there are some scripts i need to run.

    Hi user;
    Please check:
    How to get Client IP address in oracle apps. Are there any API's.
    Re: How to get Client IP address in oracle apps. Are there any API's.
    Hope it helps
    Regard
    Helios

  • Get client ip address from Web Service hosted on OAS 10.1.2

    Hi,
    Can anyone advice how to get the client IP from a web service (java) hosted on Oracle Application Server 10.1.2.
    The below code works if the web service is hosted on Tomcat.
    MessageContext msgCtxt = MessageContext.getCurrentMessageContext();
    String IP = (String)msgCtxt.getProperty("REMOTE_ADDR");
    This code is causes built errors on the OAS 10.1.2 since it needs Axis and many other Jars. I tried to insert the jars needed but unfortunately when i was able to compile it returned a java.lang.NullPointerException.
    Is there a way to get the IP address of the client that calls this web service ?
    Or is there a way to read the SOAP request maybe i can retrieve the client IP from it.
    Thanks for your support,
    regards

    http://forums.sun.com/thread.jspa?threadID=5371892&messageID=10636223
    Thank you!

  • Getting client IP Address via reverse proxy

    We're using APEX 4.2.1. I've configured APEX to recognise the X-Forwarded-For header so I can use owa_util.get_cgi_env ('X-Forwarded-For') when available to get the IP address of the client. Does APEX provide a safer way to access this header?
    In the APEX Instance Security configuration settings you can specify a comma separated list of proxy servers. This works fine for internal APEX logs, but how do I tap into this in my apps?
    What I'm looking for is a function that returns the X-Forwarded-For header when the client IP is in the proxy list or otherwise it returns the REMOTE_ADDR header, without having to maintain a list of trusted proxy IP's elsewhere. I don't want the two sources to inadvertently get out of sync.

    Also it may not be any use, e.g. if it is a 192.*.*.* or 10.*.*.* address allocated via NAT. For example it may not be unique among all poossible clients. If you need a client identity it is best to generate it yourself.

  • Getting clients MAC address !!!

    Is there any mechanism in Solaris where we can get the MAC address of an another system
    Which is newly connected to the network (same subnet)
    Situation is : a new system with out OS and its connected to the network, with out going to the console
    of this system how to get the MAC address of it.
    May be its possible may be not, anyway we are doing some testing and we have come across an issue.
    Thank you.
    VCP

    If the system is set to boot from the network, which is the way that a lot of out-of-the-box Sun systems used to be (don't know if they still are), you could at least perform a rudimentary snoop of the network to see if there are any ARP/RARP requests that happen to appear when the system is turned on. You'll be able to see the resulting MAC address in the request. But, again, the system has to be set to boot from the network fr this to work.
    Otherwise, I don't know of any way other than the console itself.

  • How to get client Ip address from web service

    Hello folks,
    I am quite new to web service and developing a web service using netbeans6.0 IDE, where i have to know which client called/used the service, After googling i got code snippet like below
    inject a WebServiceContext instance into your WebService class, and use it in each WebMethod to get the current request's MessageContext Map. Get the SERVLET_REQUEST item from that, cast as an HttpServletRequest. From that HttpServletRequest, you can invoke getRemoteAddr() to get the client's IP.
    @WebService
    public class MyService{
    @Resource
    WebServiceContext wsCtxt;
    @WebMethod
    public void myWebMethod(){
    MessageContext msgCtxt = wsCtxt.getMessageContext();
    HttpServletRequest req = (HttpServletRequest)msgCtxt.get(MessageContext.SERVLET_REQUEST);
    String clientIP = req.getRemoteAddr();
    }But it throws error in my PC like
    Service invocation threw an exception with message : null; Refer to the server log for more details
    Exceptions details : java.lang.reflect.InvocationTargetExceptionIs there any way that says client pc ip address using netbeans6.0 Or what went wrong in my code?
    Largely Thanks in advance.
    SRI.

    I am afraid,
    javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:340)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:311) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy102.processMessage999(Unknown Source) ... 40 more Caused by: java.lang.NullPointerException at org.shar.Handle.processMessage999(Handle.java:120) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361) ... 2 more

  • Getting Client IP address in Webcenter access log files

    In addition to Understanding Webcenter Spaces Access Log File
    I want to trace the IP address of the client machine from where webcenter spaces is being accessed.
    How to capture this?
    Please help.
    -- Navin K

    You can access one of two server logs:
    If you embedded an HTTP Server in front of WebLogic (which is what Oracle recommends), then you have access information in OHS (which is just like Apace).
    If you are using a managed server (or even the admin server) in WebLogic, same thing, different name/place (the http access log).
    same discussions are going on in other thread -
    How to get the IP adress of the user who have accessed Webcenter Spaces ?

  • Getting client IP address from PL/SQL Portal API

    I'm doing a customized login portlet where I'll like to get access to the IP address (I order to restrict admin access to specific IP addresses).
    Is that possible in the Portal API.

    Hi,
    Check this help.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/de/89023c59698908e10000000a11402f/frameset.htm
    You'll see that there is a param wdisp/add_xforwardedfor_header
    which
    "The parameter determines whether the SAP Web dispatcher includes the IP address of the client in the header field x-forwarded-for. If it does, the application on the application server can read the route that the request has taken. If the parameter has the value false, the Web dispatcher leaves the header field unchanged."
    Together with the forwarder field that I've mentioned earlier, this should achieve things you need.
    Eddy

  • Audit client IP address in EBS R12

    Dear all;
    We have a business requierment to audit the IP address of the client machine that conneted to the application. Our application is EBS R12 under UNIX AIX 5.
    Appreciate your advice;
    Regards;
    Mohammad Al-Masri;

    Mohammed,
    Please see these threads.
    How to i get client IP address of a system on Oracle E-biz
    Re: How to i get client IP address of a system on Oracle E-biz
    Audit
    http://forums.oracle.com/forums/search.jspa?threadID=&q=Audit&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • HT4061 I downloaded an iTunes update on my HP.  PC and restarted the computer for the hangers to take effect. Now my pc is locked up.  It gives me a client Mac address and no boot file name received.  What happened, and how do I get my pc back?

    I downloaded an iTunes update and when ashen I restarted my pc it locked up.  It says client Mac address 001320bead25,   PXE E53  No boot file name received.  PXE MOF.  Exiting Broadcom pie rom.   How do I get my pc back!

    When you installed iTunes on your work computer, then connected your iPad to that computer, it wiped what was on the iPad, then put the iTunes library (nothing) from the work computer onto the iPad. You can try copying the iTunes folder from your home computer over to your work computer, but since the apps were bought with a different account, they may not load or update properly.

  • How do I get list of client IP Addresses using new Airport Utility v6.3?

    I have purchased and Airport Time Capsule 3TB (newest model).  Previous models were still compatible with Airport Utility 5.6 and I could use "manual" mode to get a list of client IP addresses attached to the device.  The new Airport Time Capsule is only compatible with Airport Utility 6.3 and I cannot figure out how to get a list of client IP addresses with this new model. Does anyone know how to do this?

    Try a ping broadcast - for example if your network were 192.168.1.xxx (netmask of 255.255.255.0) try this from a Termnal.app window (located in /Applications/Utilities):
         ping 192.168.1.255
    If you have a different type netmask, you need to put 255's where the 0's are in your netmask.
    Everyone on the local network (the 192.168.1.xxx network) should reply that is up and running unless you have them setup to not respond to pings (the WAN port on your TC should not reply cause it's in a different network) and you have your list of clients on the network. If you setup the TC to dedicate a range of addresses for WiFi clients you can even identify which of them are wired and which are wireless.
    good luck.

  • Get the client IP address

    Hello everybody, I'm a student new with java, I'm developing a little server application - running standalone, and I'm trying to get the client Ip address, have a look on my code snippet:
    InetAddress fromcli;
    while(true){
    welcomeSKT.accept()
    fromcli = welcomeSKT.getInetAddress();
    System.out.println("The client Ip Address is: " + fromcli.getHostAddress() + '\n');
    The sysout println returns the 0.0.0.0 that is the server address, mapped to more than one interface eg:(loopback and eth0) - But if with the getInetAddress() method I get the server address where is the difference with the getLocalHost()? - By the way, anyone has a suggestion to print out the client remote address.
    Thank you in advance....
    Jeppojeps
    Edited by: jeppojeps on Mar 24, 2008 3:36 AM

    Oh, sorry of course welcomeSKT is a ServerSocket, actually the snippet that I put is a part of the code, here below I put the complete program, in order to clarify my question, however I would like to know if it's possible to understand from the server side the client IP address, and if yes how...
    Thank you in advance...
    * THIS simple TCP server receives some numbers in input by the client and give back the sum - actually the exceptions are managed in a uncomplete way....but this is my first java program...be patient with me...
    * @jeppojeps
    * @0.1
    import java.io.*;
    import java.net.*;
    public class ServerTCP
    // instance variables - replace the example below with your own
    public static void main(String[] args) throws Exception
    String clientSentence;
    String capitalized;
    InetAddress fromcli;
    String clientIp;
    String portIp;
    int z=0;
    int port=0;
    if (args.length == 0 ){
    System.out.println("Usage: ServerTCP lport" + '\n');
    System.exit(-1);
    else
    port = Integer.parseInt(args[0]);
    if(port <= 1024) {
    System.out.println("Remember dude, only root can use a portnumber < 1024" + '\n');
    else{
    ServerSocket welcomeSKT = new ServerSocket(port);
    System.out.println("Server instance started:" + '\n');
    while(true){
    Socket connectionSocket = welcomeSKT.accept();
    BufferedReader InfromClient = new BufferedReader (new
    InputStreamReader(connectionSocket.getInputStream()));
    DataOutputStream outToClient =
    new DataOutputStream(connectionSocket.getOutputStream());
    outToClient.writeBytes("Hello give me some numbers and I'll give you the sum" + '\n');
    fromcli = welcomeSKT.getInetAddress();
    System.out.println("The client Ip Address is: " + fromcli.getHostAddress() + '\n');
    clientSentence = InfromClient.readLine();
    for(int i = 0 ; i < clientSentence.length() ; i++) {
    try {
    Character c = new Character(clientSentence.charAt(i));
    capitalized = c.toString();
    int x = Integer.parseInt(capitalized);
    System.out.println("Number digited from the client: " + x + '\n');
    z+=x;
    catch(NumberFormatException nfe) {
    System.out.println("Text: " + clientSentence.charAt(i));
    capitalized = Integer.toString(z);
    outToClient.writeBytes("The sum of the given number is: " + capitalized + '\n');
    welcomeSKT.close();
    }

Maybe you are looking for

  • Item category and Account assignment category field grayed out in PR/PO

    Hello all, While making a PR/PO we use both the item category and account assignment category. However, after saving the PR/PO, when i try to change the fields through ME22N/ME52N, the fields are greyed out. I dont think this can be controlled throug

  • Dynamic Subtotal that includes Local Member in sum

    Hi, I have a dynamic report that i have separated into sections using blank local members. Now within one of these groups is a local member row that is an EPMRETRIEVEDATA function that is pulling some other data. Finally, I have a repeating subtotal

  • XML - IIS - Oracle 8i ?

    Hi, Is it possible to create a XML template containing e.g. a select statement that runs through a browser hosted in IIS that connects to an Oracle 8i database and returns the data in XML format? If so I guess I need some sort of driver/configuration

  • Blob downloaded, not displayed

    Hello. We have apex application with one record report that shows image. We use database procedure to show image. And call it in apex like: '<img src="show_image?p_id=' || NVL(dp.id, 0) || '" height="200" width="200" />' as imageBut the image is not

  • How to change language in Logic Studio?

    My MacBook is Mac OS X 10.5.6, the system language is Traditional Chinese, I want to fill English in my Logic Studio, even though I choose the English when filling software, Logic Studio still run Simplified Chinese, How to change language for Logic