Declare a setHttpServletRequest( HttpServletRequest req ) method on your implementation class.
-----Original Message----- From: Oscar Picasso [mailto:[EMAIL PROTECTED] Sent: Sunday, March 12, 2006 1:57 PM To: tapestry-user@jakarta.apache.org Subject: How to access HttpServletRequest from inside an IEngineService? Hi, I have an IEngineService that needs to know the HTTP method (HEAD or GET) that was used for the request. In its service method I can do the following: cycle.getRequestContext().getRequest().getMethod() However the getRequestContext() is deprecated. I have tried something like: cycle.getEngine().getInfrastructure().getRequest() but it returns a WebRequest that does not have a getMethod(). I have read somewhere that you could do something like: @InjectObject("service:tapestry.globals.HttpServletRequest") public abstract HttpServletRequest getHttpServletRequest(); But it only works for pages and components and I want by IEngineService to check the HTTP method regardless of wich page is currently served. What' the proper way to get the HTTP method in that case? Thanks Oscar --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]