Hi Mike,

If you still have issues, then post your code... this is an issue that comes up 
a lot it should probably be documented.

regards,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

----- Original Message -----
From: "DH" <ningd...@gmail.com>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Monday, 7 December, 2009 08:18:05 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: Access the Tapestry IoC from another servlet

ServletContext context = FilterConfig.getServletContext();
context.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME);

See TapestryFilter, hope that helps.

DH
http://www.gaonline.com.cn

----- Original Message ----- 
From: "Mike Leonardo" 
To: <users@tapestry.apache.org>
Sent: Monday, December 07, 2009 2:08 PM
Subject: Access the Tapestry IoC from another servlet


> Hello!
> 
> I'm writing an application that has both a T5 web app and also a Restlet 
> servlet in the same project. So T5 is the servlet-filter and the Restlet is 
> an actual servlet. To allow both to co-exist I've configured the T5 AppModule 
> to ignore anything with /rest/ at the beginning of the request - and that all 
> works fine.
> 
> The issue is that I would really like to use the Tapestry IoC from the web 
> app in my Restlet servlets. Is there anyway to do this? I tried following the 
> instructions for non-web registry creation (added the code to the restlet 
> initialization) and got the message:
> 
> "[ERROR] internal.SerializationSupport Setting a new service proxy provider 
> when there's already an existing provider.  may indicate that you have 
> multiple IoC Registries."
> 
> So I think the Restlet actually sees the registry from the web app running. 
> Is that true - and if so can I get access to it?
> 
> Sorry, I'm a bit new to all this configuration.
> Thanks for any help!
> 
> Michael Leonardo
> - iFactory Software Engineer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
>

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

Reply via email to