3
votes

We have a large - and quite old - project using JSF 1.1 (specifically the MyFaces implementation) with JSP as view technology. Right now we want to upgrade the used JSF version, view technology and taglibs in use. Migrating from JSF 1.2 to JSF 2.0 gave some idea of the woes we are likely to encounter.

I am new to JSF but I do understand that Facelets are only supported since JSF 2.x, so we need to update the JSF version before we can begin replacing JSPs with Facelets.

Currenty, we also use some old taglibs like Ajax4JSF and an old version of RichFaces, that - IIRC - is based on Ajax4JSF and of which one main feature is also to provide Ajax functionality and Ajax-enabled components to JSF. If I got this right, JSF 2.x supports Ajax functionality natively and therefor taglibs like Ajax2JSF aren't really needed anymore.

Since it seems that RichFaces' "life cycle" has finished last year (according to wikipedia), this also seems to be a good opportunity to also replace RichFaces with PrimeFaces, which seems to be still in active development and gets recommended quite often. I am not sure, though, if this replacement makes sense or if these two component libraries even offer similar components or if they aim two provide two totally different sets of components and this replacement is a bad idea to begin with.

One way or the other, I'd like to know in which order these 3 steps would make the most sense. Since Facelets require JSF 2.x and current versions of modern taglibs also only seem to work with new JSF versions, I assume updating JSF has to be done first, but concerning the replacement of JSPs with Facelets and of RichFaces/Ajax4JSF with PrimeFaces, in which order should these two be done?

My guess is that current taglibs might also depend on Facelets so perhaps this order makes the most sense?

  1. JSF 1.1 => JSF 2.x
  2. JSP => Facelets
  3. RichFaces => PrimeFaces
1
I've faced a similiar question, moving from JSP to JSF, but my solution was to re-right every thing since there is a gap between JSP and JSF i am afread to tell you that you are in a worst caseYagami Light
Sorry for being pessimistic but you are facing a real challenge (it for sure depend on the size of your application)Yagami Light
@YagamiLight thanks for your comment. I do understand that there is no such thing as upgrading JSP to JSF, since JSP is just the old default template engine/view technology of JSF, so it would rather be "upgrading from JSP to Facelets" (which I mentioned as the second point above), but my main point is that I don't necessary need to update everything at once. I would be perfectly happy with just updating JSF from 1.1 to 2.x first and keep the JSP templates for the time being. Then, once everything runs with JSF 2 I could concentrate on replacing the JSPs with Facelets.scholt
it's totally true ( read this post to have a better look to What is the difference between JSF, Servlet and JSP?, if you ask for my opinion if the decision is your's upgrading from SF from 1.1 to 2.x is a good step but somethimes (and it was my case) it's not your decisionYagami Light
@YagamiLight yes, thanks, I already read stackoverflow.com/questions/2095397/… and it was very englightening - like most of the posts by BalusC. As mentioned, I also read stackoverflow.com/questions/4441713/… which gave me the impression that just updating the JSF version from JSF 1.x to JSF 2.x while still keeping JSP wouldn't be so hard and a good point to start such an upgrade progress.scholt

1 Answers

0
votes

To answer my own question: After working on this upgrade for some time and running into a few dead ends, for me the following order of steps has turned out best:

  1. Upgrade JSF implementation (in my case: from MyFaces 1.1 to MyFaces 2.2.12)
  2. Replace JSP files with Facelets and comment out all occurences of tags from unsupported tag libraries (some functionality will be lost until the migration is completed, but this way I have to migrate those taglibs just once - to use them in Facelets - and not twice (once for use in JSPs with JSF 2, and then for use in Facelets))
  3. Replace and update unsupported and outdated tag libs