Thursday, August 01, 2013

Get Session id and IP Address in Tapestry5

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: