Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Redirect 从java代码重定向到login.xhtml页面_Redirect_Jsf 2_Primefaces_Spring Webflow - Fatal编程技术网

Redirect 从java代码重定向到login.xhtml页面

Redirect 从java代码重定向到login.xhtml页面,redirect,jsf-2,primefaces,spring-webflow,Redirect,Jsf 2,Primefaces,Spring Webflow,我试图通过使用JSF和SpringWebFlow的java代码重定向到flow文件夹中的login.xhtml。 使用下面的代码:-它重定向到下面的路径,而不是login.xhtml。 ExternalContext ec=FacesContext.getCurrentInstance().getExternalContext(); 重定向(ec.getRequestContextPath()+“/beas/login”) 浏览器错误-页面未正确重定向 尝试了NavigationHandler

我试图通过使用JSF和SpringWebFlow的java代码重定向到flow文件夹中的login.xhtml。

使用下面的代码:-它重定向到下面的路径,而不是login.xhtml。

ExternalContext ec=FacesContext.getCurrentInstance().getExternalContext(); 重定向(ec.getRequestContextPath()+“/beas/login”)

浏览器错误-页面未正确重定向

尝试了NavigationHandler,但也无法处理重定向状态

NavigationHandler NavigationHandler=facesContext.getApplication().getNavigationHandler(); //handleNavigation(facesContext,null,“/login?faces redirect=true”)


更新信息:-

下面是SpringWebFlow配置,我在其中定义了基本路径

下面是SpringMVC配置,其中我定义了faceletsViewResolver

下面是安全配置xml

配置文件夹:-