You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Engelhart <me...@mac.com> on 2004/12/03 23:12:37 UTC

Accessing Global from ApplicationServlet

Hi -

Is there a method to access the Global object from ApplicationServlet?  
I wanted to put my main cache object into the Global object but can't 
seem to find a way to do it.   Or if there is a better suited globally 
accessible place to store/retrieve an object that would be fine as 
well.

Thanks
Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Accessing Global from ApplicationServlet

Posted by Michael Engelhart <me...@mac.com>.
Thanks Bryan for pointing to that code.    That worked great..

Mike
On Dec 3, 2004, at 5:36 PM, Bryan Lewis wrote:

> Maybe this snippet from AbstractEngine.java will help.
>
>     String name = GLOBAL_NAME + ":" + servletName;
>     _global = servletContext.getAttribute(name);
>
>
> ----- Original Message -----
> From: "Michael Engelhart" <me...@mac.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, December 03, 2004 5:12 PM
> Subject: Accessing Global from ApplicationServlet
>
>
>> Hi -
>>
>> Is there a method to access the Global object from ApplicationServlet?
>> I wanted to put my main cache object into the Global object but can't
>> seem to find a way to do it.   Or if there is a better suited globally
>> accessible place to store/retrieve an object that would be fine as
>> well.
>>
>> Thanks
>> Mike
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Accessing Global from ApplicationServlet

Posted by Bryan Lewis <br...@maine.rr.com>.
Maybe this snippet from AbstractEngine.java will help.

    String name = GLOBAL_NAME + ":" + servletName;
    _global = servletContext.getAttribute(name);


----- Original Message ----- 
From: "Michael Engelhart" <me...@mac.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, December 03, 2004 5:12 PM
Subject: Accessing Global from ApplicationServlet


> Hi -
> 
> Is there a method to access the Global object from ApplicationServlet?  
> I wanted to put my main cache object into the Global object but can't 
> seem to find a way to do it.   Or if there is a better suited globally 
> accessible place to store/retrieve an object that would be fine as 
> well.
> 
> Thanks
> Mike
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org