What is Difference between JSP and Facelets
Java Server Pages (JSP) is java technology which enables Web developers and designers to rapidly develop and easily maintain, information-rich, dynamic Web pages that leverage existing business systems. JSP technology separates the user interface from content generation, enabling designers to change the overall page layout without altering the underlying dynamic content.
Facelets is the first non JSP page declaration language designed for JSF (Java Server Faces) which provided a simpler and more powerful programming model to JSF developers as compare to JSP. It resolves different issues occurs in JSP for web applications development.
In below table a differences between Facelets and JSP is shown by comparing different features of JSP and Facelests.
Feature Name
|
JSP
|
Facelets
|
Pages are compile
|
A Servlet that gets executed each time the page renders. The UI
Component hierarchy is built by the presence of custom tags in the page.
|
An abstract syntax tree that, when executed, builds a UIComponent hierarchy
|
Handling of tag
attributes
|
All tag attributes must be declared in
a TLD file.
|
Tag attributes are completely dynamic and automatically map to properties, attributes and ValueExpressions on
UIComponent instances
|
Page template
|
Not supported directly. For templating must go outside of core JSP
|
Page templating is a core feature of Facelets
|
Performance
|
Due to the common implementation technique of compiling a JSP page to a Servlet, performance can be slow
|
Facelets is simpler and faster than JSP
|
EL Expressions
|
Expressions in template text cause unexpected behavior when used in JSP
|
Expressions in template text operate as expected.
|
JCP Standard
|
Yes, the specification is separate from the implementation for JSP
|
No, the specification is defined by and is one with the implementation.
|
0 comments
Post a Comment