On Aug 28, 2012, at 12:13 PM, Alberto Soto wrote: > Hi guys, > > We're migrating the code to Magnolia 4.5 and we have some several problems. > In one part of our code, we have a Servlet, and there it's our fist battle > with IOC > > I cannot be able to find the way in how you really instanciate through Guice > this two components (TemplatingFunctions && STKTemplatingFunctions), because > we need to get a new way to invoke > > STKUtil.getSite() > > So, this function it's in STKTemplatingFunctions. Can somebody help me to get > an instance of it in a servlet?
Components.getComponent(SiteManager.class).getCurrentSite() is probably what you are looking for, tho using IoC would be really better solution to your problem. HTH, Jan ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
