12
返回列表 发新帖
楼主: Sky-Tiger

Oracle 11g: The motivation, not the fruition

[复制链接]
论坛徽章:
350
2006年度最佳版主
日期:2007-01-24 12:56:49NBA大富翁
日期:2008-04-21 22:57:29地主之星
日期:2008-11-17 19:37:352008年度最佳版主
日期:2009-03-26 09:33:53股神
日期:2009-04-01 10:05:56NBA季后赛大富翁
日期:2009-06-16 11:48:01NBA季后赛大富翁
日期:2009-06-16 11:48:01ITPUB年度最佳版主
日期:2011-04-08 18:37:09ITPUB年度最佳版主
日期:2011-12-28 15:24:18ITPUB年度最佳技术原创精华奖
日期:2012-03-13 17:12:05
11#
 楼主| 发表于 2009-7-7 23:28 | 只看该作者
MyFaces Trinidad and WebLogic

A JSF component library -- Apache MyFaces Trinidad -- presents another scenario that calls for tweaking WebLogic. If you use a Trinidad version older than 10.*.10 on a WebLogic server, the partial page rendering mechanism does not function properly. (Trinidad has no problems on OC4J.) Trinidad assumes that the content type of an Ajax request is always text/xml. On a WebLogic server this assumption is wrong. On WebLogic the content type is text/html and is interpreted as such by Trinidad, with the result that the partial page rendering mechanism fails. A solution for this issue is to hard-code the content type, as shown in Listing 3:
Listing 3. Hard-coding an Ajax request's content type on WebLogic

@SuppressWarnings("deprecation")
final class XmlHttpServletResponse extends HttpServletResponseWrapper {
    private String _contentType = null;

    XmlHttpServletResponse(ServletResponse response) {
        super((HttpServletResponse)response);
        _contentType = "text/xml;charset=utf-8";
    }
...

    @Override
    public void setContentType(final String type) {
        super.setContentType(_contentType);
    }
}

The setContentType method overrides the default behavior and sets the content type to text/xml, relegating the partial page rendering issue to the history books.
Deploying Trinidad to WebLogic domains

As I mentioned earlier, WebLogic uses domains. It is possible to install libraries -- for example, a Trinidad library -- on a certain domain. To achieve this you just package the Trinidad JARs into a WAR file. Then you can deploy the library as you would any other application. After the library is deployed, this entry is automatically added to the domain's configuration file (config.xml):

<library>
    <name>trinidad</name>
    <target>GeneralServer</target>
    <module-type>war</module-type>
    <source-path>pad\trinidad.war</source-path>
    <deployment-order>1</deployment-order>
    <security-dd-model>DDOnly</security-dd-model>
</library>

Note that the configuration file contains all the domain's configured resources. To let a deployed application use a library, you must configure the deployment override for the application by adding an entry to the weblogic.xml file (which is created automatically if a deployment plan has been created):

使用道具 举报

回复
论坛徽章:
277
马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11版主9段
日期:2012-11-25 02:21:03ITPUB年度最佳版主
日期:2014-02-19 10:05:27现任管理团队成员
日期:2011-05-07 01:45:08
12#
发表于 2009-7-7 23:33 | 只看该作者
看起来费劲

使用道具 举报

回复
论坛徽章:
131
乌索普
日期:2017-09-26 13:06:30马上加薪
日期:2014-11-22 01:34:242014年世界杯参赛球队: 尼日利亚
日期:2014-06-17 15:23:23马上有对象
日期:2014-05-11 19:35:172014年新春福章
日期:2014-04-04 16:16:58马上有对象
日期:2014-03-08 16:50:54马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14
13#
发表于 2009-7-8 22:11 | 只看该作者
怎么就这么点

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表