Solved

How to get visotr ip address in web devlopment using struts j2ee project

Posted on 2011-02-16
2
559 Views
Last Modified: 2012-05-11
I want to get visitor ip address into struts action class to save into the DB.

Provide me some sample code .
0
Comment
Question by:bowebell
2 Comments
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 500 total points
ID: 34913576
java.net.InetAddress.getLocalHost().getHostAddress(); in java u can use this in ur JSP
0
 

Author Closing Comment

by:bowebell
ID: 34916380
I USED THE request.getremoteAddress() and solved the problem
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HashMap Vs TreeMap 12 68
servlet requestdispatcher include and forward differences 1 45
arguments to jar 5 39
jmss example java 2 31
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question