如何使Websphere 8.5使用Mojarra而不是MyFaces [英] How to make websphere 8.5 use mojarra not myfaces

查看:117
本文介绍了如何使Websphere 8.5使用Mojarra而不是MyFaces的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Eclipse中运行的JSF2(Richfaces 4.1.0)项目. 我正在尝试使用mojarra jsf实现(2.2.0)在WAS 8.5上运行它. 然后为lib提供了maven,但服务器似乎覆盖了它们,因为在控制台中,我可以读取Myfaces已加载.

i've a JSF2 (Richfaces 4.1.0) project running in eclipse. I'm trying to run it on WAS 8.5 using mojarra jsf implementation (2.2.0). Then lib are provided with maven but the server seems to override them since in console i can read that Myfaces as been loaded.

我想知道为什么WAS这样行事?如何在管理控制台中不使用共享库的情况下使项目使用mojarra?

i'm wondering why WAS act like this ? how to make the project use mojarra without using shared libs in was admin console ?

这是代码中与Maven相关的部分:

this is maven relevant portion of code :

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.2.0</version>
    </dependency>

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.2.0</version>
    </dependency>

    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>javax.faces-api</artifactId>
        <version>2.2</version>
    </dependency>

    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.faces</artifactId>
        <version>2.2.0</version>
    </dependency>

预先感谢

推荐答案

我写了这个

I wrote this blog to demonstrate how to make websphere 8.5 use mojarra not myfaces.

  1. 将Mojarra侦听器添加到所需的web.xml文件. <listener><listener-class>com.sun.faces.config.ConfigureListener</listener-class></listener>
  2. 将Mojarra JSF实现(即javax.faces-2.1.24.jar,jsf-api-2.1.24.jar和jsf-impl-2.1.24.jar)添加到环境">共享库"中.
    • javax.faces-2.1.24.jar(GroupId:org.glassfish)
    • jsf-api-2.1.24.jar(GroupId:com.sun.faces)
    • jsf-impl-2.1.24.jar(GroupId:com.sun.faces)
  1. Add the Mojarra listener to the required web.xml file. <listener><listener-class>com.sun.faces.config.ConfigureListener</listener-class></listener>
  2. Add the Mojarra JSF implementation, which are javax.faces-2.1.24.jar, jsf-api-2.1.24.jar and jsf-impl-2.1.24.jar, to the Environment > Shared Libraries.
    • javax.faces-2.1.24.jar (GroupId: org.glassfish)
    • jsf-api-2.1.24.jar (GroupId: com.sun.faces)
    • jsf-impl-2.1.24.jar (GroupId: com.sun.faces)

这篇关于如何使Websphere 8.5使用Mojarra而不是MyFaces的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆