What is the difference between JSF, Servlet and JSP?

前端 未结 15 1894
北海茫月
北海茫月 2020-11-21 06:41

I have some questions. These are :

  1. How are JSP and Servlet related to each other?
  2. Is JSP some kind of Servlet?
  3. How are JSP and JSF related t
15条回答
  •  逝去的感伤
    2020-11-21 07:16

    JSF is an advanced framework wherein its very easy to implement Model-View-Controller (MVC) based architecture for projects. Main advantage of JSF over JSP is the easy dynamic rendering of the components on the browser based upon conditions and easy integration of ajax events.

    The front end of the JSF application i.e. xhtml files are the ones which are shown to the user via browser. These xhtml files internally invoke managed beans e.g. controllers wherein actual application logic is written.

    The controllers internally invoke various services which communicate with database (using Hibernate or JPA API). This is how the flow happens in short.

    JSF is also used in combination with RichFaces which is a framework for giving rich look and feel to your web application.

    JSF + RichFaces + Hibernate/JPA is a good technology to learn for sure !

提交回复
热议问题