What is the difference between JSF, Servlet and JSP?

前端 未结 15 1870
北海茫月
北海茫月 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:08

    From Browser/Client perspective

    JSP and JSF both looks same, As Per Application Requirements goes, JSP is more suited for request - response based applications.

    JSF is targetted for richer event based Web applications. I see event as much more granular than request/response.

    From Server Perspective

    JSP page is converted to servlet, and it has only minimal behaviour.

    JSF page is converted to components tree(by specialized FacesServlet) and it follows component lifecycle defined by spec.

提交回复
热议问题