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 .
bowebellAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Sathish David Kumar NConnect With a Mentor ArchitectCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.