JSF is a proper framework that connects a data source with a reuseable UI component, provides support for multiple libraries, and decreases the effort to build and manage applications. Being component-based, JSF always has a good security advantage over JSP.
JSF is a web-based application that is used to simplify the development integration of web-based user interfaces. While JSP is a Java-based technology used respectively in order to support software developers create dynamic web pages. JSP must be compiled in Java bytecode in order to work properly.
JSF (JavaServer Faces) Since JSF 2.0, JSP has been deprecated as view technology in favor of Facelets. Note: JSP itself is NOT deprecated, just the combination of JSF with JSP is deprecated.
Facelets is a powerful but lightweight page declaration language that is used to build JavaServer Faces views using HTML style templates and to build component trees. Facelets features include the following: Use of XHTML for creating web pages.
In the light of that, let's take a look at your conflicting statements:
That JSF is a replacement for JSP; and
Not quite true, since JSF can use JSPs for its view (and had to, prior to JSF 2). However, JSF apps using Facelets can be seen as a replacement for JSP-based technologies.
JSF and JSP form different parts of the View in Java's web-tier MVC paradigm
Completely wrong - JSF covers the entire MVC pattern (though it can overlap with EJBs, since both are based on annotations that can be mixed in the same class).
From Wikipedia article(JSF)
JSF is a request-driven MVC web framework based on component driven UI design model, using XML files called view templates or Facelets views.
JSF is web framework and Facelet is a view template for JSF
From Wikipedia article(JSP)
JavaServer Pages (JSP) is a Java technology that helps software developers serve dynamically generated web pages based on HTML, XML,
Also look at this topic Difference between jsf and jsp
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.
Here is a table that compares the features of scriplets and facelets:
Source
I've been looking for an answer for the same question. I found these links very helpful:
An Example of JSP application model: http://netbeans.org/kb/docs/javaee/ecommerce/design.html#architecture
Basic JSF Concepts, some by examples: http://netbeans.org/kb/docs/javaee/ecommerce/conclusion.html#framework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With