Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

client IP address

  Asked By: Jodon    Date: Aug 31    Category: Java    Views: 996

I am writing an ejb based application ,and I want to get the IP
address of client that connected to a statless session bean .
so could any one help me?



1 Answer Found

Answer #1    Answered By: Alexander Fields     Answered On: Aug 31

If this is for security purpose you can use JAAS programmatically to get users info

also if the request is coming through a servlet, HttpServletRequest.getRemoteAddr can be helpful.SessionContext.getCallerIdentity could be useful but its deprecated. not sure about alternative

Didn't find what you were looking for? Find more on client IP address Or get search suggestion and latest updates.