Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Facelets fits JSF like a glove

  Asked By: Jeff    Date: Jul 19    Category: Java    Views: 907

Trying to combine JSF and JSP is like trying to shoehorn a foot into a glove: it's possible, but not pleasant. This article introduces developers to Facelets' easy HTML-style templating and reusable composition components that fits JSF like a glove.

While working on a JavaServer Faces (JSF) project recently, I had the pleasure of using Facelets for the first time. What I most liked about Facelets was that it let me create reusable composition components. Being able to take a page (like a JSP) and turn it into a component has been a real boon to my JSF development ever since. My conclusion? If you're not using Facelets, you're not getting the most you can out of JSF.

The mismatch between JSF and JavaServer Pages technology is a serious problem in JSF development. The issue is how to integrate JSP's dynamic content into JSF's component-based model. JSP is singularly focused on generating dynamic output, whereas JSF requires JSP to coordinate building a component model. The disjunct occurs because that task is beyond the original intention of JSP.

Most JSF developers simply learn to navigate such problems on an ad-hoc basis, but that's kind of like duct-taping a pillow to a hammer so it won't hurt coming down on your head. Facelets is a much more comprehensive solution: a templating language that is geared toward the JSF component model.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Facelets fits JSF like a glove Or get search suggestion and latest updates.