0

This may be obvious but I can't see to find my way to the ServletRequest object within a gwt-dispatch ActionHandler.execute() method.

I'm needing to get to the servlet's getRemoteHost() method.

I'm using v1.0 of gwt-dispatch.

Stevko
  • 4,345
  • 6
  • 39
  • 66

1 Answers1

0

I figured this out...

Using guice, inject a Provider into the constructor of the Handler.

Provider<HttpServletRequest> servletRequest

then in the execute method, use the provider like this...

// request ip address
String ipAddress = servletRequest.get().getRemoteAddr();
Stevko
  • 4,345
  • 6
  • 39
  • 66