简体   繁体   中英

Upgrading JSF from 1.2 to 2.1 on JBoss 5.1.1

I'm trying to upgrade my webapp from JSF 1.2 to JSF 2.1. Here's what I'm running now:

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

I want to upgrade to JSF 2.1. Here's what I'm currently trying to switch to:

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

I've included the following jars from the SEAM 2.3.0 package in the war file:

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

The jsf jars under the JBoss directory are:

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

When I use my app, it seems like JSF 2.1 is working fine, but at startup, I see these lines in the server log:

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.

Questions

  1. Why Initializing Mojarra (1.2_13-b01-FCS) ? Does it just show this at startup then switch to using JSF 2.1 at runtime?

    If I swap out the 2 jars under ./server/default/deploy/jbossweb.sar/jsf-libs/ with the jsf 2.1 jars, I get Initializing Mojarra 2.1.7 (SNAPSHOT 20120206) instead. However, the packages that come with jboss all fail with ClassNotFoundExceptions.

  2. Is there some way to have all of the jboss deployables (such as jbossweb.sar ) continue to use JSF 1.2 while my app uses JSF 2.1?

  3. Is there some way to get my app to spit out the JSF version at runtime?

  4. What's the deal with the The ELResolvers for JSF were not registered with the JSP container. INFO message? My app has always logged that message at startup.

On JBoss 5.1.1 EAP, I've upgaded JSF 1.2 to JSF 2.1 (Mojarra implementation).

My experience is related into this french article: http://javaetmoi.com/2014/06/notes-migration-jsf2-richfaces4-jboss5-eap/ ( Google translate is your friend )

You will learn how to uninstall JSF 1.2. JSF 2.1 is embedded into the lib/ folder of your WAR / EAR. It's working geat:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM