将JSF 1.2应用程序迁移到JSF 2.0 [英] JSF 1.2 application migration to JSF 2.0

查看:162
本文介绍了将JSF 1.2应用程序迁移到JSF 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我的Web应用程序基于以下库/框架/工具:

Currently, my web-application is based on the following libraries / frameworks / tools:

  • Java 1.6
  • JSF 1.2_07-b03-FCS
  • 手镯1.1.14
  • Richfaces 3.3.2.GA
  • EL-Functors 1.0.2
  • 春季2.5.2
  • Tomcat服务器v5.5
  • Java 1.6
  • JSF 1.2_07-b03-FCS
  • Facelets 1.1.14
  • Richfaces 3.3.2.GA
  • EL-Functors 1.0.2
  • Spring 2.5.2
  • Tomcat server v5.5

一些其他信息:

  • Spring负责管理JSF使用的所有bean(org.springframework.web.jsf.DelegatingVariableResolver在我的faces-config.xml文件中定义为variable-resolver).
  • EL-Functors用作我的el-resolver,以便扩展表达式语言.
  • 我创建了许多自定义组件,其中一些只是Facelets组成,其他是基于Java的组件(其中有些是Richrichs组件的扩展).
  • Spring is in charge of managing all the beans used by JSF (org.springframework.web.jsf.DelegatingVariableResolver is defined as the variable-resolver in my faces-config.xml file).
  • EL-Functors is used as my el-resolver in order to extend the Expression Language.
  • I've created many custom components, some of them are just Facelets compositions, others are Java-based components (some of them are extending Richfaces components).

我想尝试(本质上是出于好奇,但是如果这很好用,为什么不使用 real ?)将我的应用程序迁移到JSF 2.0.

I want to try (essentially for curiosity, but if this works well, why not for real?) to migrate my application to JSF 2.0.

问题#1 :为了使我的应用程序正常运行,我必须考虑哪些关键点?

Question #1: what are the critical points that I must consider in order to make my application working correctly?

我在这里谈论的只是拥有一个正在工作的应用程序,没什么,仅此而已.

I am talking here about just having a working application, nothing less, nothing more.

我已经知道我将必须检查所有自定义组件,因为我将使用新版本的Richfaces(4.0),并查看它们是否正常工作.

I alread know that I will have to review all my custom components, because I will use the new version of Richfaces (4.0), and also see if they work correctly.

问题2 :要利用JSF 2.0的第一步是什么? 我已经有了一些想法:

Question #2: what will be the first steps to achieve to take advantages of JSF 2.0? Some ideas I already have are:

  • 删除EL-Functors并使用Expression Language 2.2;
  • 让JSF管理Bean,并使用@ManagedBean.还是切换到CDI库,例如 Weld ?
  • 使用<f:ajax>代替<a4j:support>吗?
  • Remove EL-Functors and use the Expression Language 2.2;
  • Let JSF manage the beans, and use the @ManagedBean. Or maybe switch to a CDI library, such as Weld?
  • Use <f:ajax> instead of <a4j:support>?

关于JavaEE6

我知道,一个好主意是完全迁移到JavaEE6.我很喜欢这样做,但是由于某些原因,我不能那样做.一个(不好的)原因是我必须留在Tomcat服务器上. 但是,我可以添加新的第三方库以具有某些JavaEE6功能,例如EL 2.2 ... 因此,请在回答时考虑这一方面.

I know, a good idea would be to completely move to JavaEE6. I'd liked to do so, but for some reasons I just can't do that way. One (bad) reason is that I must stay on Tomcat servers. However, I can add new third-party libraries in order to have some JavaEE6 features, such as EL 2.2... So please consider this aspect in your answers.

致谢.

推荐答案

如果您打算使用Tomcat,那么迁移到Java EE 6意味着您将使用Tomcat 7.

If you plan to stay with Tomcat, then moving to Java EE 6 means you're going to be looking at Tomcat version 7.

但是,如果您需要成熟的Java EE 6服务器,那么GlassFish 3或JBoss 6是更好的选择.当您尝试执行诸如CDI(焊接)或EJB 3之类的操作时,Tomcat可能会显得有些呆板.

But if you want a full-fledged Java EE 6 server then GlassFish 3 or JBoss 6 is a better alternative. Tomcat can be iffy when you try to do certain thing like CDI (Weld) or EJB 3.

我只有两分钱.希望对您有帮助...

Just my two cents worth. Hope it helps...

这篇关于将JSF 1.2应用程序迁移到JSF 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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