• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finding out client IP.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding out client IP.


  • Subject: Re: Finding out client IP.
  • From: Tanmoy Roy <email@hidden>
  • Date: Wed, 30 Nov 2005 18:28:03 +0530

Hi Gennady,
Please find below a code piece that we use for getting the client IP.

public String getIpFromWOContext (WOContext iContext) {
        String	aUserIP = null;

        if (iContext != null) {
            if (iContext.request() != null )
                aUserIP = iContext.request().headerForKey("remote_addr");
        }
        return aUserIP;
    }

Thanks,
Tanmoy

On 11/30/05, Gennady Kushnir <email@hidden> wrote:
> Hello, List.
>
> Can WO somehow realize, from what IP the request is received?
> I need to restrict some functions of my app to be available from internal
> LAN only.
>
> The method proposed in "Practical WebObjects" does not work.
> And I can't find any WORequest's header containing client IP.
> I made all headers (public NSDictionary headers()) to show up on the screen
> - and client IP was not mentioned there.
>
> Perhaps it is because I test my app running it to Direct Connect?
> But I successfully connected to it from another comp on the net - ant still
> no client IP in headers.
>
>
> Thanks in advance
> Gennady
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
>


--
Best,
Tanmoy
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Finding out client IP. (From: Gennady Kushnir <email@hidden>)

  • Prev by Date: Re: Finding out client IP.
  • Next by Date: Re: Finding out client IP.
  • Previous by thread: Re: Finding out client IP.
  • Next by thread: Re: what are the limitations of the JNDIAdapter?
  • Index(es):
    • Date
    • Thread