• 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 .
1 Solution
Sathish David Kumar NArchitectCommented:
java.net.InetAddress.getLocalHost().getHostAddress(); in java u can use this in ur JSP
bowebellAuthor Commented:
I USED THE request.getremoteAddress() and solved the problem

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