As James pointed out you use set... so that the service gets autowired by hivemind (setter based dependency injection)
http://jakarta.apache.org/hivemind/hivemind-examples/setters.html

Oscar Picasso wrote:
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]

Reply via email to