What is the difference between JSF, Servlet and JSP?

前端 未结 15 1899
北海茫月
北海茫月 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 !

    0 讨论(0)
  • 2020-11-21 07:17

    JSP stands for JAVA SERVER PAGE........ jsp is not a servlet. Jsp uses code and HTML tag both in itself you dont need to make a HTML and a servlet seprately.Jsp are playing magnificent role in web application. Servlet is a java class plays an role to make your HTML page from static to dynamic .

    0 讨论(0)
  • 2020-11-21 07:20

    Servlet - it's java server side layer.

    • JSP - it's Servlet with html
    • JSF - it's components base on tag libs
    • JSP - it's converted into servlet once when server got request.
    0 讨论(0)
提交回复
热议问题