You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by corsair <pa...@fontel.net.ua> on 2006/06/23 09:12:56 UTC

[q] How to access to hivemind registry not from Pages

Hello!
How to get access to classes in registry not from tapestry pages?
I need same instance of classes in another Servlets and Filters.


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


Re: [q] How to access to hivemind registry not from Pages

Posted by Shing Hing Man <ma...@yahoo.com>.
I think this was discussed recently in the mailing
list.

The registry is stored as a context parameter.
You can get it by doing something like :

ServletContext context = session.getServletContext();
Registry registry = (Registry) context
			
.getAttribute(ApplicationServlet.REGISTRY_KEY_PREFIX_PUBLIC
						+ "mathToolkit");
(replace mathTookit by the name of the servlet name
associated  with the servlet
class org.apache.tapestry.ApplicationServlet in
web.xml)

Note that 
ApplicationServlet.REGISTRY_KEY_PREFIX_PUBLIC is
private! 
So you have to change the above a little bit.
The registry is constructed in the method
ApplicationServlet.constructRegistry.


Shing

--- corsair <pa...@fontel.net.ua> wrote:

> Hello!
> How to get access to classes in registry not from
> tapestry pages?
> I need same instance of classes in another Servlets
> and Filters.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

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