Hello,
I need to know who visits my web page. In jsp, I got "null" when I used
"request.getRemoteUser()". Then any other mehods can obtain user's name or
IP address?
Thanks
Jack Li
: "Jack Li" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 3:35 PM
Subject: How to obtain user's IP address
> Hello,
>
> I need to know who visits my web page. In jsp, I got "null" when I used
> "request.getRemoteUs
They are different things. The remote user only appears if the user did
enter his user id and password. The IP address you want is the remote
host, so you would use
request.getRemoteHost();
Un saludo,
Alex.
Jack Li wrote:
>
> Hello,
>
> I need to know who visits my web page. In jsp, I got "nu
ay, May 03, 2001 7:35 AM
> To: [EMAIL PROTECTED]
> Subject: How to obtain user's IP address
>
>
> Hello,
>
> I need to know who visits my web page. In jsp, I got "null"
> when I used
> "request.getRemoteUser()". Then any other mehods can obtain
> user's name or
> IP address?
>
> Thanks
> Jack Li
>
Title: RE: How to obtain user's IP address
The name of the 'user' would be dependent on the machine which called the servlet. Where did you get request.getRemoteUser()??
There is a getRemoteHost and getRemoteAddr method to the ServletRequest class which will return either
Hi Jack,
Try get request.getRemoteAddr(). Good Luck ;)
Francis
--- Jack Li <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I need to know who visits my web page. In jsp, I got
> "null" when I used
> "request.getRemoteUser()". Then any other mehods can
> obtain user's name or
> IP address?
>
> T
request.getRemoteAddr()
-Original Message-
From: Jack Li [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 15:35
To: [EMAIL PROTECTED]
Subject: How to obtain user's IP address
Hello,
I need to know who visits my web page. In jsp, I got "null" when I used
"request.ge
tions
thru native code. Please refer to documents on JDC or step thru the above
apis in the debugger (JSwat).
-Original Message-
From: Steven Parks [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 8:58 AM
To: [EMAIL PROTECTED]
Subject: RE: How to obtain user's IP address
T
ROTECTED]]
> Sent: Thursday, May 03, 2001 7:35 AM
> To: [EMAIL PROTECTED]
> Subject: How to obtain user's IP address
>
>
> Hello,
>
> I need to know who visits my web page. In jsp, I got "null"
> when I used
> "request.getRemoteUser()". Then any other mehods can obtain
> user's name or
> IP address?
>
> Thanks
> Jack Li
>