Visitor IP Address and Host Name using jsp

Ads
 

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

Ads









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..., In which the host name of the local system is Comp20 and the IP address
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
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
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
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
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
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
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
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
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
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
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
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
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
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
how to host a website using asp.net
how to host a website using asp.net  what are steps to host a website
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
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
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
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
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

Ads