In my grails application, I have implemented the interface HttpSessionListener
to listen for session creation as given below:
c
You can also use this interface in your HttpSessionListener : ServletRequestListener You can implement : requestInitialized() like this.
@Override
public void requestInitialized(ServletRequestEvent servletRequestEvent) {
this.request = (HttpServletRequest) servletRequestEvent.getServletRequest();
}
it s working fine, the request object can bring you the remote adress, there is a méthod to do that