@InjectObject("service:tapestry.globals.HttpServletRequest") public abstract HttpServletRequest getServletRequest();
Tapestry will do the magic and give you a valid reference. On 3/21/06, Asim Khaja <[EMAIL PROTECTED]> wrote: > 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]