Hi, Have a try with
public RequestFilter buildRequestLoggingFilter(RequestGlobals requestGlobals){ } , requestGlobals has the HttpServletRequest. DH http://www.gaonline.com.cn ----- Original Message ----- From: "learningtapestry" <satish...@yahoo.com> To: <users@tapestry.apache.org> Sent: Thursday, July 16, 2009 9:33 AM Subject: Log remote IP address with MDC class? > > Is there any way to log the remote IP address using the log4j MDC. If I > contribute to RequestHandler inside my AppModule, I have a way of getting a > hold of the org.apache.tapestry5.services.Request, but from this Request, > there isn't no way of getting the IP address of the remote machine. > > I don't want to add this my pages/components for various reasons. > > > public RequestFilter buildRequestLoggingFilter(){ > return new RequestFilter(){ > public boolean service(Request request, Response response, > RequestHandler handler) throws IOException { > MDC.put("remoteIP", ???????????? ); > return handler.service(request, response); > } > }; > } > > > > > -- > View this message in context: > http://www.nabble.com/Log-remote-IP-address-with-MDC-class--tp24508725p24508725.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >