• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:

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

I want to get visitor ip address into struts action class to save into the DB.

Provide me some sample code .
0
bowebell
Asked:
bowebell
1 Solution
 
Sathish David Kumar NArchitectCommented:
java.net.InetAddress.getLocalHost().getHostAddress(); in java u can use this in ur JSP
0
 
bowebellAuthor Commented:
I USED THE request.getremoteAddress() and solved the problem
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now