this.servletContext.addInitParameter("com.sun.faces.externalizeJavaScript", "true");
// setup VCP renderKit, create renderers.
RenderKitFactory vcpRenderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
vcpRenderKit = new ChameleonRenderKitImpl();
vcpRenderKitFactory.addRenderKit("HTML_CHAMELEON", vcpRenderKit);
renderKit.addRenderer(UIViewRoot.COMPONENT_FAMILY, UIViewRoot.COMPONENT_TYPE, new AjaxViewRootRenderer());
// setup nessesary components.
application.addComponent("javax.faces.ViewRoot", MockViewRoot.class.getName());
// setup AjaxContext.