代码之家  ›  专栏  ›  技术社区  ›  Stanley Mungai

服务器重定向这个地址的请求的方式永远不会完成JSF2.2

  •  0
  • Stanley Mungai  · 技术社区  · 5 年前

    我陷入困境是因为我无法使用JSF进行简单的重定向。我的重定向代码是:

    if (!ischangelicense && source == 1) {
                System.out.println("Here*****: Should redirect here");
                FacesContext fc = FacesContext.getCurrentInstance();
                ConfigurableNavigationHandler nav = (ConfigurableNavigationHandler) fc.getApplication().getNavigationHandler();
                nav.performNavigation("login?faces-redirect=true");
            }
    

    在我得到的浏览器 server is redirecting the request for this address in a way that will never complete Here*****: Should redirect here 多次打印,我也不知道为什么。我该怎么解决这个问题?

    0 回复  |  直到 5 年前