You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Istvan Szucs <st...@inbox.com> on 2007/11/12 19:35:59 UTC
[T4] Context real path
Hi,
How can I get the real context path in Tapestry 4.0.2?
It is not enough:
public void test(IRequestCycle cycle) {
String contextPath = cycle.getEngine().getInfrastructure().getContextPath();
}
Best regards,
Stef
____________________________________________________________
GET FREE 5GB EMAIL - Check out spam free email with many cool features!
Visit http://www.inbox.com/email to find out more!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4] Context real path
Posted by Istvan Szucs <st...@inbox.com>.
Hi,
Thank you, I forgot this injection.
Best regards,
Stef
> -----Original Message-----
> From: matmsh@yahoo.com
> Sent: Mon, 12 Nov 2007 11:28:22 -0800 (PST)
> To: users@tapestry.apache.org
> Subject: Re: [T4] Context real path
>
> Have you tried the following ?
>
>
> @InjectObject(service:tapestry.globals.ServletContext")
> public abstract ServletContext getServletContext();
>
>
> Shing
>
> --- Istvan Szucs <st...@inbox.com> wrote:
>
>> Hi,
>>
>> How can I get the real context path in Tapestry
>> 4.0.2?
>>
>> It is not enough:
>> public void test(IRequestCycle cycle) {
>> String contextPath =
>>
> cycle.getEngine().getInfrastructure().getContextPath();
>> }
>>
>> Best regards,
>> Stef
>>
>>
> ____________________________________________________________
>> GET FREE 5GB EMAIL - Check out spam free email with
>> many cool features!
>> Visit http://www.inbox.com/email to find out more!
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail:
>> users-help@tapestry.apache.org
>>
>>
>
>
> Home page : http://www.lombok.demon.co.uk/
>
>
>
> ___________________________________________________________
> Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
> http://uk.promotions.yahoo.com/forgood/environment.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
____________________________________________________________
GET FREE 5GB EMAIL - Check out spam free email with many cool features!
Visit http://www.inbox.com/email to find out more!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4] Context real path
Posted by Kevin Menard <km...@servprise.com>.
You likely want to inject the ServletContext into your page. In T4.0.2, you
need to explicitly reference the tapestry.globals name (don't recall it off
hand -- check the HiveDoc). In Tapestry 4.1+, you don't need to inject it
by name, as it will be auto-wired.
--
Kevin
On 11/12/07 1:35 PM, in article 32EF2CF9180.00000486stefhun@inbox.com,
"Istvan Szucs" <st...@inbox.com> wrote:
> Hi,
>
> How can I get the real context path in Tapestry 4.0.2?
>
> It is not enough:
> public void test(IRequestCycle cycle) {
> String contextPath = cycle.getEngine().getInfrastructure().getContextPath();
> }
>
> Best regards,
> Stef
>
> ____________________________________________________________
> GET FREE 5GB EMAIL - Check out spam free email with many cool features!
> Visit http://www.inbox.com/email to find out more!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4] Context real path
Posted by Shing Hing Man <ma...@yahoo.com>.
Have you tried the following ?
@InjectObject(service:tapestry.globals.ServletContext")
public abstract ServletContext getServletContext();
Shing
--- Istvan Szucs <st...@inbox.com> wrote:
> Hi,
>
> How can I get the real context path in Tapestry
> 4.0.2?
>
> It is not enough:
> public void test(IRequestCycle cycle) {
> String contextPath =
>
cycle.getEngine().getInfrastructure().getContextPath();
> }
>
> Best regards,
> Stef
>
>
____________________________________________________________
> GET FREE 5GB EMAIL - Check out spam free email with
> many cool features!
> Visit http://www.inbox.com/email to find out more!
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
>
>
Home page : http://www.lombok.demon.co.uk/
___________________________________________________________
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org