I'd like to get the HTTPServletRequest and HTTPServletResponse, so that i
can use the RequestDispatcher to forward my application to another servlet.
I found that I can do
        HttpServletRequest req = cycle.getRequestContext().getRequest();
        HttpServletResponse res = cycle.getRequestContext().getResponse()
but, this way results in a warning, becuase getRequestContext() has been
deprecated, what is the best way to accomplish the same thing using tapestry
4.0?


Should I add

<invoke-factory
service-id="hivemind.lib.ServicePropertyFactory<http://jakarta.apache.org/tapestry/tapestry/hivedocs/service/hivemind.lib.ServicePropertyFactory.html>"
model="singleton<http://jakarta.apache.org/tapestry/tapestry/hivedocs/config/hivemind.ServiceModels.html>"
>

   - <construct property="request" service-id="RequestGlobals" />

</invoke-factory>

to my hivemodule.xml and then do

<page-specification class=". . .">

  <inject property="request" object="service:RequestGlobals"/>

</page-specification>


?

Thanks,
Asim

Reply via email to