Hi Gertjan,
Worked a treat. Also solved lots of other quetions at the same time. Did
some more searching and found could also use:
@InjectObject("infrastructure:request")
plus some very cool spring integration using this annotation.
Many Thanks
Tony De Keizer
> -----Original Message-----
> From: Gertjan Assies [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 15 October 2005 22:20
> To: Tapestry users
> Subject: Re: getRequestContext() replacement
>
>
> use injection like this in your page class:
>
> @InjectObject("service:tapestry.globals.WebRequest")
> public abstract WebRequest getWebRequest();
>
>
> On Sat, 2005-10-15 at 10:07 +1000, Tony De Keizer wrote:
> > I am in the process of upgrading an application from Tapestry
> 3.0.3 to 4.0
> > and I am slowly but surely removing the deprecated components and method
> > calls from my code.
> >
> > In one of of page classes I need access to the session and in
> Tapestry 3.0.3
> > used the call
> >
> > HttpSession session =
> getRequestCycle().getRequestContext().getSession();
> >
> > to retrieve it.
> >
> > As getRequestContext() is now deprecated, can someone tell me
> how best to
> > get the current http session object from inside a page class.
> >
> > Kind Regards
> > ========================================
> > Tony De Keizer
> > --
> > No virus found in this outgoing message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.344 / Virus Database: 267.12.0/134 - Release Date:
> 14/10/2005
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.12.0/134 - Release Date: 14/10/2005
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.1/136 - Release Date: 15/10/2005
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]