在JBoss 5.1.1上将JSF从1.2升级到2.1

时间:2013-04-22 13:26:00

标签: java jsf jboss seam mojarra

我正在尝试将我的webapp从JSF 1.2升级到JSF 2.1。 这就是我现在正在运行的:

| Item  | Version     |
| ----- | ----------- |
| JBoss | 5.1.1 (EAP) |
| Seam  | 2.2.1 (EAP) |
| JSF   | 1.2         |

我想升级到JSF 2.1。以下是我目前要切换到的内容:

| Item  | Version     |
| ----- | ----------- |
| JBoss | 5.1.1 (EAP) |
| Seam  | 2.3.0 (EAP) |
| JSF   | 2.1         |

我在war文件中包含了以下来自SEAM 2.3.0软件包的jar:

jboss-jsf-api_2.1_spec.jar
jsf-impl.jar

JBoss目录下的jsf jar是:

./server/default/deploy/jbossweb.sar/jsf-libs/jsf-api.jar
./server/default/deploy/jbossweb.sar/jsf-libs/jsf-impl.jar

当我使用我的应用程序时,似乎就像JSF 2.1工作正常,但在启动时,我在服务器日志中看到这些行:

2013-04-22 08:33:50,044 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (main) Initializing Mojarra (1.2_13-b01-FCS) for context '/myapp'
2013-04-22 08:34:06,811 INFO  [javax.enterprise.resource.webcontainer.jsf.lifecycle] (main) JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.

问题

  1. 为什么Initializing Mojarra (1.2_13-b01-FCS)?它只是在启动时显示这个,然后在运行时切换到使用JSF 2.1吗?

    如果我将./server/default/deploy/jbossweb.sar/jsf-libs/下的2个罐子换成jsf 2.1罐子,我会得到Initializing Mojarra 2.1.7 (SNAPSHOT 20120206)。但是,jboss附带的软件包都会因ClassNotFoundExceptions而失败。

  2. 在我的应用程序使用JSF 2.1时,有没有办法让所有jboss可部署(例如jbossweb.sar)继续使用JSF 1.2?

  3. 有没有办法让我的应用程序在运行时吐出JSF版本?

  4. The ELResolvers for JSF were not registered with the JSP container. INFO消息的处理方式是什么? 我的应用程序始终在启动时记录该消息。

1 个答案:

答案 0 :(得分:0)

在JBoss 5.1.1 EAP上,我已经将JSF 1.2升级到JSF 2.1(Mojarra实现)。

我的经验与这篇法文文章有关:http://javaetmoi.com/2014/06/notes-migration-jsf2-richfaces4-jboss5-eap/Google translate is your friend

您将学习如何卸载JSF 1.2。 JSF 2.1嵌入到WAR / EAR的lib /文件夹中。 它的工作原理是:

20:52:19,534 INFO  [config] Initialisation de Mojarra 2.1.19 ( 20130213-1512 https://svn.java.net/svn/mojarra~svn/tags/2.1.19@11614) pour le contexte «/richfaces-showcase» - See more at: http://javaetmoi.com/2014/06/notes-migration-jsf2-richfaces4-jboss5-eap/#sthash.fDmunAGP.dpuf