What is the difference between JSF and Facelets?

前端 未结 3 1175
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-25 15:18

I am following the Java EE6 tutorials and I don\'t understand the difference between JSF and Facelets. Chapter 4 goes has a section \'Developing a Simple JavaServerFaces App

相关标签:
3条回答
  • 2020-12-25 15:45

    JSF is used with Facelets, before we were using jsp. Facelet is a view technology based on xml.

    Facelets was originally created as a separate, alternative view declaration language for JSF 1.1 and JSF 1.2 which both used JSP as the default view declaration language. Starting from JSF 2.0, Facelets has been promoted by the JSF expert group to be the default view declaration language. JSP has been deprecated.

    Important features facelets provides are templating, composite components, content reuse.

    http://www.ibm.com/developerworks/library/j-facelets/

    0 讨论(0)
  • 2020-12-25 15:55
    • JSF - Java Server Faces is the overarching application development framework. It contains many aspects, one of which is the view handler. JSF (Wikipedia), JSF (Stack Overflow).

    • Facelets is a view handler for JSF. Before JSF 2.0, JSP was the default view handler, but the problem was JSP didn't work very well with JSF's component based framework. Facelets was designed from the ground up to work well with JSF. Facelets (Wikipedia), Facelets (Stack Overflow)

    Tag libraries are a different part of the JSF spec. They are collections of UI components. Facelets is not a taglib, and many tag libs can be used with Facelets.

    0 讨论(0)
  • 2020-12-25 16:02

    JSF is as you probably already gathered a component based system. These components are organized in libraries.

    JSF is the base standard and defines the standard taglibs core and html. These include the tags for such basic elements as input fields, buttons, labels and links. Facelets is the facelets taglib, it was originally distributed seperatly but now it is included in the JSF standard. Facelets contains tags like ui:composition, ui:insert and ui:define that can be used for templating. There are many other tag libraries that can be used with JSF like primefaces, richfaces, tomahawk and trinidad.

    0 讨论(0)
提交回复
热议问题