【发布时间】:2014-01-02 20:54:53
【问题描述】:
我看过这些帖子:Issues with JSF navigation rules using redirect on HTTPS 和 JSF 2 and Post/Redirect/Get?,但我无法得到我想做的工作。我正在尝试使用 ConfigurableNavigationHandler 重定向到我的应用程序中的 https 页面。这是我的handleNavigation:
public void handleNavigation(FacesContext context, String from, String outcome) {
System.out.println("outcome: " + outcome);
if (outcome.startsWith("manageEmail")) {
outcome = "https://localhost:8081/appmonitor/faces/manageEmail.xhtml";
}
System.out.println("outcome: " + outcome);
parent.handleNavigation(context, from, newOutcome);
}
当我点击重定向到“manageEmail”的链接时,我看到结果以“manageEmail”开头,并更改为我的 https 地址,但实际上并没有重定向到那里。我怀疑它试图导航到http://localhost:8080/appmonitor/faces/https://localhost:8081/appmonitor/faces/manageEmail.xhtml。如果这是实际发生的情况,有没有办法覆盖这种行为?
【问题讨论】: