Visitor IP Address and Host Name using jsp

Visitor IP Address and Host Name using jsp

I have created one jsp page and i want to display the ip address of the visitor in my page. I used the following code to get the ip address: String ip=request.getRemoteAddr(); But i am not getting the correct ip address.I am getting the same ip address (127.0.0.1) for all the systems that i use.Also all the systems are connected through proxy.

View Answers

October 8, 2013 at 2:14 PM

Hi,

If you host the application in one computer and then use the browser of another computer in network and then call the page it will give you the IP address of client.

Since you are on the localhost you are getting ip address (127.0.0.1).

Thanks









Related Tutorials/Questions & Answers:
Visitor IP Address and Host Name using jsp
Visitor IP Address and Host Name using jsp  I have created one jsp page and i want to display the ip address of the visitor in my page. I used the following code to get the ip address: String ip=request.getRemoteAddr(); But i am
Find Your Host Name/IP Address
Find Your Host Name/IP Address   ... the getLocalHost() method to print the Host name as well as the IP Address of the local... is as under, In which the host name of the local system is Comp20 and the IP
Advertisements
To retrieve the IP address from Host Name, vice-versac
To retrieve the IP address from Host Name, vice-versa... to explain the method to find out the IP address from host name and to vice verse. Here... with getHostAddress() which return the IP address of that Host . If the user enter any
Find the Host name in reverse of given IP address
Find the Host name in reverse of given IP address.... Now retrieve the Host name of the IP address what we are pass in getByName... shows the host name of the IP address what ever we pass in the getByName
Overview of Networking through JAVA,Find the Host name in reverse of given IP address
Find the Host name in reverse of given IP address.... Now retrieve the Host name of the IP address what we are pass in getByName... shows the host name of the IP address what ever we pass in the getByName
Overview of Networking through JAVA,To retrieve the IP address from Host Name, vice-versa
To retrieve the IP address from Host Name, vice-versa... to explain the method to find out the IP address from host name and to vice verse. Here... with getHostAddress() which return the IP address of that Host . If the user enter any
Java Get Host Name
name of a computer or an IP address using Java application language. The given... Java Get Host Name       In this Example you will learn how to get host name in Java
Java Get IP Address
Java Get IP Address       This section illustrates you how to obtain the IP Address of local host. An IP address is either a 32-bit or 128-bit unsigned number used
Getting IP Address
Getting IP Address  Hi... i want to get the ip address of the current machine running my jsp program.... example: my ip is 172.16.11.247... from other system if i run my jsp program using my ip like 172.16.11.247/myfile.jsp i
Getting IP Address
Getting IP Address  Hi... i want to get the ip address of the current machine running my jsp program.... example: my ip is 172.16.11.247... from other system if i run my jsp program using my ip like 172.16.11.247/myfile.jsp i
IP Address validation
IP Address validation  hi,I m now working with my final yr project,nd stuck in th middle i don't know how to validate the IP address in a JText field...(ie) the user shld enter the IP address in JTxt and when he hit the 'Submit
Getting IP address of All the machines
Getting IP address of All the machines  Program how to fetch All the IP address on my domain(LAN) in java
finding the ip address of other system and store in the database - JDBC
finding the ip address of other system and store in the database  code to find the ip address,host name and their locale of other system... in database.if any other system tries to connect our system ,we have to find the ip address
ModuleNotFoundError: No module named 'ip-address'
ModuleNotFoundError: No module named 'ip-address'  Hi, My Python... 'ip-address' How to remove the ModuleNotFoundError: No module named 'ip... have to install padas library. You can install ip-address python
ModuleNotFoundError: No module named 'ip-address'
ModuleNotFoundError: No module named 'ip-address'  Hi, My Python... 'ip-address' How to remove the ModuleNotFoundError: No module named 'ip... have to install padas library. You can install ip-address python
ModuleNotFoundError: No module named 'docker-host-ip'
ModuleNotFoundError: No module named 'docker-host-ip'  Hi, My... named 'docker-host-ip' How to remove the ModuleNotFoundError: No module named 'docker-host-ip' error? Thanks   Hi, In your python
Get Local Host Name
Get Local Host Name     ... you in understanding a code how to 'Get Local Host Name'. For this we have...,this class represents a Network Interface made up of a name and a list of IP
Why do I need Dedicated IP?
A dedicated IP means that a website has its own IP address. When users type URL or the IP address it brings to the same domain name. Dedicated IP address.... This type of hosting provides a unique IP address that is used exclusively
Find Your Host Name
Find Your Host Name   ... the host name of the local system in a very simple example. Here we are just call...() method and pass it in the object. In this way we find out the ip address
Get IP Address in Java
Get IP Address in Java In this example we will describe How to get ip address in java. An IP address is a numeric unique recognition number which...(). getHostAddress(). InetAddress():-The InetAddress is class represents an IP address. ADS
Find Exact Location from IP address in java?
Find Exact Location from IP address in java?  I am looking for API where we can pass IP address and get the location (Cityname,Country name). please suggest any API OR sample code. Thank you
PHP Get Browser IP Address
PHP Get Browser IP Address PHP provides us  $_SERVER['REMOTE_ADDR'] function is used to display the Browser IP address PHP Get IP Address Code:ADS_TO_REPLACE_1 <?php echo "My Browser IP is :". $_SERVER['REMOTE
How I Upload File and Store that file name in Database using JSP
How I Upload File and Store that file name in Database using JSP  Hi All, I m the beginner in JSP and I want to upload the file and store that file... form like Emp name, Emp id, city, address and one employee profile image(upload
Java example program to get IP address of own system
=InetAddress.getLocalHost(); gets the computer system's local host with IP address. Now we can get... Java example program to get IP address of own system       java get own IP address An IP
ModuleNotFoundError: No module named 'yxh-ip-address'
ModuleNotFoundError: No module named 'yxh-ip-address'  Hi, My... named 'yxh-ip-address' How to remove the ModuleNotFoundError: No module named 'yxh-ip-address' error? Thanks   Hi, In your python
Write a program using JSP that enables any student to change his/her address.
Write a program using JSP that enables any student to change his/her address.  Write a program using JSP that enables any student to change his/her address
Get IP Address Example
Get IP Address Example       This example shows you ip address of your... : NetworkInterface.getNetworkInterfaces() : Network Interface class is used for get name, and a list of IP
insert name city and upload image in database using mysql and jsp
insert name city and upload image in database using mysql and jsp   insert name city and upload image in database using mysql and jsp
Image name,image path into database and image into folder using jsp
Image name,image path into database and image into folder using jsp  How to insert image path and image name into oracle database and image into folder using jsp
how to host a website using asp.net
how to host a website using asp.net  what are steps to host a website
insert name city image in database using mysql and jsp
insert name city image in database using mysql and jsp  how to insert name ,city and image in database in mysql and jsp   Here is an example in jsp that insert name, city and image to database. <%@ page import
Overview of Networking through JAVA,Find Your Host Name
Find Your Host Name   ... the host name of the local system in a very simple example. Here we are just call...() method and pass it in the object. In this way we find out the ip address
How can I find my DHCP IP address on my computer?
How can I find my DHCP IP address on my computer?  Hi, I am using Ubuntu and I trying to find the IP address assigned to my computer by DHCP server. How to find the IP address? Thanks   Hi, You can try following
ReadIPAddress
address for the given host name. Using this object we can get IP... to print this value. If the user enters the host name by keyboard then IP address... ReadIPAddress Enter the host name: roseindi IP address is: 192.168.10.104
how to get an lan system ip and mac address in java code
how to get an lan system ip and mac address in java code  strong text
ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension'
ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension...: ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension...-ip-address-extension' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension'
ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension...: ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension...-ip-address-extension' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension'
ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension...: ModuleNotFoundError: No module named 'python-neutronclient-ip-address-extension...-ip-address-extension' error? Thanks   Hi, In your python
Problem in setting IP address for a JFrame Class Desktop Application
Problem in setting IP address for a JFrame Class Desktop Application  I have designed a browser for our final year project, it is working well..., the browser is unable to load anything. I don't know how to set IP address for our
How to store user name,city,state,image path into database and image into folder using jsp
How to store user name,city,state,image path into database and image into folder using jsp  How to store user name,city,state,image path into database and image into folder using jsp
How To Unblock IP address from command line in CSF Firewall ââ?¬â?? Linux Server?
How To Unblock IP address from command line in CSF Firewall ΓΆβ?¬β?? Linux Server?  Hi, How To Unblock IP address from command line in CSF Firewall... the ip and then restart the csf server using following command: csf -r
Get System Ip
to get a IP address. For this we have a class name GetSystemIP,Inside the main...; The System IP address is a unique numerical identification... for a IP address is a 32- bit numeric address written as four number separated
Email validation is JSP using JavaScript
will show you how to validate email address in you JSP program using JavaScript... Email validation is JSP using JavaScript.... In your JSP program you can use JavaScript to validate the email address
get from address using javamail api?
get from address using javamail api?  i want to get from address of particular mail using the javamail api? actually i had done it in one .jsp file using the particular mail number. message[messageno].getFrom()[0
reading data from a text box with the same name using servlets - JSP-Servlet
reading data from a text box with the same name using servlets  Hello sir, i want to get the values from four textboxes having the same name like a= b= c= using servlet i want to print all the values from each text
sql query to get name,age,phone,address from tables t1,t2,t3,t4,t5 ..
sql query to get name,age,phone,address from tables t1,t2,t3,t4,t5 ..  ... , address FROM t1 order by name"; this is for 2 tables : query ="SELECT t.name... by name"; i want for 12 tables : i want to fetch name age pwd phone address from 12
Name Displaying - JSP-Servlet
Name Displaying  Dear Sir, Please any one help me......... when i enter some value in text that value is already in database dispaly the alert...( ); } User Name
IP Locator
IP Locator       IP Locator is a site based on the aiaxian google maps api, the user enters an Internet IP address to know the location of this ip in the global map. Enter the IP address
Using Scriplet in JSP - JSP-Servlet
on } IN HOME JSP ****** home.jsp **** Currently I am directly using... the values from the Bean through the scriplets. Name: Address...Using Scriplet in JSP  Hi, I need to display suitable fields in my
Using Network Address To Connect to a Database
name is 127.0.0.1. A JDBC URL provides a way to identify a database host, so... and password is "root" An example of using network address to connect... .style1 { text-align: center; } How To Use Network Address To Connect

Ads