【发布时间】:2018-02-23 08:54:45
【问题描述】:
我在使用 Primefaces 对话框框架打开对话框时遇到问题。我们正在使用 SSO 解决方案通过与公司内部 SSO 解决方案集成来为我们的应用程序提供安全性。
简而言之。 我们服务器上应用程序的真实地址(没有 sso)例如:https://appserver1.net/ctx/page.xhtml(其中 ctx 是我们应用程序的根上下文) 在正常情况下,我们会得到 sso 地址,例如:https://ssoaddress.net/junction/page.xhtml 其中结点=ctx。在请求期间重写sso地址以找到我们服务器的真实地址,获取资源并再次响应重写为sso url地址。一切正常。但是我们得到了第二个 env (DEV02),由于某些限制,我们得到了 sso 地址,其中 junction!=ctx 像:https://ssoaddress.net/junction/ctx/page.xhtml。在那种情况下,当我尝试打开对话框时,我得到了信息:“page.xhtml Not Found in ExternalContext as a Resource”。
junction=ctx 时的工作代码:
public void openTestPage() {
Map<String,Object> options = new HashMap<String, Object>();
options.put("resizable", false);
options.put("draggable", true);
options.put("modal", true);
options.put("height", 250);
options.put("contentHeight", "100%");
options.put("closable", true);
RequestContext.getCurrentInstance().openDialog("/pages/page", options, null);
}
由于在重写过程中连接点与上下文不同,因此无法找到请求的 page.html。也许你们中的某个人知道如何解决这个问题?我补充说我无法重写应用程序的上下文。 技术信息:primefaces 6.0、JSF2.2、weblogic 12.2.1。 资源结构:src/main/webapp/pages/page.xhtml
【问题讨论】:
-
如果 junction != ctx?不仅是 PF 对话框架。例如。也从服务器端正常“重定向”...
标签: primefaces jsf-2 url-rewriting single-sign-on jsf-2.2