use of javax.faces.context.FacesContextFactory in project deltaspike by apache.
the class MockedJsf2TestContainer method initFacesContext.
protected void initFacesContext() {
FacesContextFactory facesContextFactory = (FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
this.facesContext = facesContextFactory.getFacesContext(this.servletContext, this.request, this.response, this.lifecycle);
((MockFacesContext) this.facesContext).setApplication(this.application);
ExceptionHandler exceptionHandler = ((ExceptionHandlerFactory) FactoryFinder.getFactory(FactoryFinder.EXCEPTION_HANDLER_FACTORY)).getExceptionHandler();
this.facesContext.setExceptionHandler(exceptionHandler);
((MockFacesContext) this.facesContext).setExternalContext(new MockExternalContext(this.servletContext, this.request, this.response));
}
Aggregations