• Oracle BIEE11G ADF_IFRAME


       最近项目上有些变化,部门工作人员开始着手于BIEE11G界面的定制,首先开始的是报表和图形的显示部分,目前由于此部分内容已经加入了IPAD等职能终端实现,当时使用的JDEVELOPER 开发的ADF 效果不错,延迟也没有多少。现在大家都炒作响应式设计,也想把ADF 的application用在WEB站点上。

       遇到了点问题,在FLEX或者HTML中调用IFRAME控件时,

    得到的HTTP请求报错如下,很值得研究:

       1:  77:07:27.035    0.041    623    174    
       2:  GET    
       3:  (Aborted)    text/html (NS_BINDING_ABORTED)    
       4:  http://10.14.1.158:7101/Application7-ViewController-context-root/faces/jdczs.jspx?_adf.ctrl-state=1bb3lb5c3y_3&_afrRedirect=74571037281509

    报的错是NS_BINDING_ABORTED,服务器主动拒绝。

            再分析HTTP头,

       1:  (Status-Line)    HTTP/1.1 200 OK
       2:  Date    Thu, 25 Apr 2013 07:05:41 GMT
       3:  Transfer-Encoding    chunked
       4:  Content-Type    text/html;charset=UTF-8
       5:  X-ORACLE-DMS-ECID    f7a7cc060a4c8848:-6d134d01:13e3ffff60e:-8000-0000000000001c65
       6:  X-Powered-By    Servlet/2.5 JSP/2.1, JSF/2.0
       7:  X-Frame-Options    sameorigin

            值得注意的X-Frame-Option ,很显然由于I-Frame嵌入的问题

    这是我定位问题的思路:

    1. 部署ADF的WEBLOG进行了域控制,必须在同一站点进行IFRAME的嵌套。

    沿着这个思路下去的解决方案必然是:

    在同域的WEBLOGIC中再起个站点,进行桥接中转。 ---测试,失败

    使用非IFRAME空间调用ADF  --- 这个肯定能解决问题,但是实施起来难度较大。

    2.是否 OBIEE中进行HTTP请求的控制?

    翻阅文档

    B.1.1Protecting Pages in Oracle BI EE from Attack

    http://docs.oracle.com/cd/E21764_01/bi.1111/e10541/psconfigset.htm?1356360819#CIHFJGHF

    找到解决问题的办法

    默认情况下,出于安全的考虑(clickjacking),BIEE 11g是不能直接嵌入iframe中的,

    会提示“OBIEE content can not be displayed in the IFrame”

    如果有这方面的需要,我们需要进行如下配置:

    修改MV_HOME/instances/instance1/config/OracleBIPresentationServicesComponent/coreapplication_obips1目录下的instanceconfig.xml

    在Security标签内加入<InIFrameRenderingMode>allow</InIFrameRenderingMode>

    如下图所示:

       1:  <Security>
       2:  <InIFrameRenderingMode>allow</InIFrameRenderingMode>
       3:  <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
       4:  <ClientSessionExpireMinutes>30</ClientSessionExpireMinutes>
       5:  </Security>
       6:   <Security>
       7:  <InIFrameRenderingMode>allow</InIFrameRenderingMode>
       8:  <!--This Configuration setting is managed by Oracle Enterprise Manager Fusion Middleware Control-->
       9:  <ClientSessionExpireMinutes>30</ClientSessionExpireMinutes>
      10:  </Security>

    注:InIFrameRenderingMode有三种取值,分别是prohibit、sameDomainOnly、allow  大家可以根据自己的实际需要选择对应的值

    修改MV_HOME/Oracle_BI1/bifoundation/web/app/WEB-INF 目录下的web.xml

    添加如下内容:

       1:  <context-param>
       2:    <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
       3:    <param-value>never</param-value>
       4:  </context-param>

    最终如下图所示:

       1:  <servlet-mapping>
       2:   
       3:  <servlet-name>RelatedContent</servlet-name>
       4:  <url-pattern>/RelatedContent</url-pattern>
       5:  </servlet-mapping>
       6:   
       7:  <context-param>
       8:  <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
       9:  <param-value>never</param-value>
      10:  </context-param>
      11:   
      12:  <login-config>
      13:  <auth-method>CLIENT-CERT</auth-method>
      14:  </login-config>
      15:     <servlet-mapping>
      16:        <servlet-name>RelatedContent</servlet-name>
      17:        <url-pattern>/RelatedContent</url-pattern>
      18:     </servlet-mapping>
      19:   
      20:  <context-param>
      21:    <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
      22:    <param-value>never</param-value>
      23:  </context-param>
      24:   
      25:     <login-config>
      26:      <auth-method>CLIENT-CERT</auth-method>
      27:     </login-config>

    修改完之后重启BI服务即可,如果还不行,请清除浏览器缓存。还是不行。

    做了一个小测试,运行了一个站点

    View Code
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     2 <html>
     3  <head>
     4   <title> New Document </title>
     5     <meta http-equiv="Referer" content="http://10.14.1.158:7101/">
     6  </head>
     7  <body>
     8  <h1 color=red>Hello Iframe</h1>
     9   <iframe id="myframe" width="100%" height='650' src='http://localhost:7101/anaytics/biee' ></iframe> 
    10  </body>
    11 </html>

     ok 页面可以正常显示,说明BIEE的界面是可以嵌入进去的。现在把问题的重点定位在ADF Project中。
    http://docs.oracle.com/cd/E35521_01/web.111230/e16181/ap_config.htm#BABDHGEJ

    其中有个配置的值:

    View Code
    1   <context-param>
    2     <description>Add by Jerry</description>
    3     <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
    4     <param-value>samorgin</param-value>
    5   </context-param>

    这个配置项同BIEE中的意义基本相同,按照文档修改为

    View Code
    1   <context-param>
    2     <description>Add by Jerry</description>
    3     <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name>
    4     <param-value>samorgin</param-value>
    5   </context-param>

    再进行测试,OK ,大功告成。

  • 相关阅读:
    Linux常用命令解释
    RAID 10 配置流程
    VMware workstation Windows 10虚拟机安装步骤
    yum仓库配置
    vi 常用命令
    Linux设备驱动动态插入内核与直接集成到内核方式的利弊分析
    常用的Linux命令行文本处理工具总结
    CentOS使用总结(不断更新)
    vsftpd出现“Response: 500 OOPS: cannot change directory”解决方法
    NFS共享服务挂载时出现“access denied by server while mounting”的解决方法
  • 原文地址:https://www.cnblogs.com/jerryxing/p/3043182.html
Copyright © 2020-2023  润新知