Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • 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 NCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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