sean cull commented on Oct 21, 2015

Works well

Used this again recently and it now works well on Linux / 9.01 FP4

Thanks - very useful

Robert F Harwood commented on Jan 13, 2012

Re: How to access CGI variables in XPages

checked

sean cull commented on Mar 24, 2011

IP Problem is not just W64

I am seeing this IP truncation problem with a linux server and windows 32bit and 64 bit client

Thomas Adrian commented on Jan 5, 2011

Re: How to access CGI variables in XPages

truncated ip/hostname is fixed in 8.5.3. it is only a problem in windows 2008 running 64 bit Domino Server.

http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllFlatWeb/374d4943f7c2bad58525780100583604?OpenDocument

Thomas Adrian commented on Sep 9, 2010

How to access CGI variables in XPages

sorry** I meant getRemoteAddr() in previous comment**

why can't I edit my comments?

Thomas Adrian commented on Sep 9, 2010

How to access CGI variables in XPages

This is a hugh problem,

in some networks

facesContext.getExternalContext().getRequest().getServerName()

...does not work, it only returns the first part of the ip address, stil have not found a solution to this.

The strange thing is that creating a notesfield in a normal form with the name "Remote_Addr" works perfectly.

using the same code in different networks return different results

Thomas Adrian commented on Sep 7, 2010

How to access CGI variables in XPages

Sorry** below code not working** it gets the servers ip.

Thomas Adrian commented on Sep 7, 2010

How to access CGI variables in XPages

This might help you get the IP

var host = facesContext.getExternalContext().getRequest().getServerName();

var ip:java.net.InetAddress = java.net.InetAddress.getByName(host);

ip.getHostAddress()

Thomas

http://www.notessidan.se

Ondrej Ilcik commented on Sep 2, 2009

Problem with REMOTE_ADDR

I have same problem as Mr. Domino.

I tried to use everything mentioned in article above, but if I'm trying to get IP from Remote_Addr I'm getting only first part of IP (my IP is 192.168.1.1 and only 192 is displayed).

I can't figure out where can be a problem.

When I tried to ger Remote_Addr from field in Form, it worked, but I can't find a way to make it work on XPage.

Thank you for any help

Mr. Domino commented on Jun 1, 2009

Broken

I can't get this code to work.

I am trying to use the cgi.REMOTE_ADDR but no matter how hard I try, I only get the first section of the IP address.

If the IP address is "A.B.C.D" I only get "A"

I am using the example as shown above, I am performing no data-type conversions.

Andrew Tjecklowsky commented on Apr 24, 2009

How to get the input stream of the request for file uploads?

How can I get to the input stream of the request for file uploads?