environment.release();
environment = null;
}
private FacesRequest startFacesRequest() throws IOException {
FacesRequest facesRequest = environment.createFacesRequest("http://localhost/popupPanelTest.jsf");
facesRequest.withViewId("/panelTest.jsf");
facesRequest.start();
FacesContext facesContext = FacesContext.getCurrentInstance();
ViewHandler vh = facesContext.getApplication().getViewHandler();
ViewDeclarationLanguage vdl = vh.getViewDeclarationLanguage(facesContext, facesContext.getViewRoot().getViewId());
vdl.buildView(facesContext, facesContext.getViewRoot());
return facesRequest;