We are going to see on how to get the Session ID and IP Address,
Please add the below code in the class
@Inject
private HttpServletRequest httpServletRequest;
To get the IP Address
httpServletRequest.getRemoteAddr()
To get the session id
httpServletRequest.getSession().getId()
No comments:
Post a Comment