Re: tapestry-resteasy: How to Get IP Address on Resource Class

2011-12-28 Thread Yohan Yudanara
Hi, thank you very much for pointing me for using @Context. It's work... @PUT @Produces(MediaType.APPLICATION_JSON) @Path("doSomething") public String doSomething(@QueryParam("actionId") Long customerId, @Context HttpServletRequest request) { String ipAddress =

Re: tapestry-resteasy: How to Get IP Address on Resource Class

2011-12-27 Thread Bård Magnus Kvalheim
Hi Yohan, Havent tried but you should be able to get it from @Context HttpServletRequest request http://docs.jboss.org/resteasy/docs/2.3.0.GA/userguide/html_single/index.html#_Context Think context injection works on resource method as well as members. Then use request.getRemoteAddr() Guess you

tapestry-resteasy: How to Get IP Address on Resource Class

2011-12-27 Thread Yohan Yudanara
Hi, I want to ask a question about tapestry-resteasy library from tynamo ( www.tynamo.org) Is it possible to get client IP Address on tapestry-resteasy resource class? I need the IP address of incoming request for logging purpose. Thanks in advance Best regards, Yohan Yudanara