JSP x Facelets
Often we can find in the Java forums the question: “which one is better, JSP or Facelets with XHTML files?”. It is possible to create a JSF 2.0 project without the using Facelets. It is not a good practice to create a JSF 2.o project without Facelets, the project would have a lot of repeated code.
Below is written the advantages of each approach (JSF and Facelets):
|Used in more companies||Tags are rendered dynamically, there is no need of declaration of TLD (Tag Library Descriptor)|
|It is easier to learn||Facelets are more or less 50% faster|
|Facelets allow advanced usage of Templates|
|With Facelets it is easier to see the error code. We got the code isolated in pages easily.|
Notice that there are several reasons to start to use Facelets instead of JSP; JSP has been considerate outdated for JSF.