carles xuriguera
carles xuriguera

Reputation: 980

How do I get the remote address of a client in WebRequest

Is there any way that I could get the original IP address of the client coming to the server from org.springframework.web.context.request.WebRequest ?

Upvotes: 2

Views: 1121

Answers (1)

Alex
Alex

Reputation: 163

I would suggest to take a look at the hierarchy where this interface is used. Here's the UML:
UML Diagram
Main thing here is to find the place where we will be able to get the native javax.servlet.http.HttpServletRequest interface and its standard methods: getRemoteAddr(), getRemotePort(), getRemoteHost().

Upvotes: 1

Related Questions