Java EE 6: JSF vs Servlet + JSP. Should I bother learning JSF?

前端 未结 5 1452
感动是毒
感动是毒 2020-12-24 02:05

I am trying to get familiar with Java EE 6 by reading http://java.sun.com/javaee/6/docs/tutorial/doc/gexaf.html. I am a bit confused about the use of JSF.
Usually, the w

5条回答
  •  囚心锁ツ
    2020-12-24 02:19

    JSF basically enables you to develop a web application with only model objects (JavaBeans) and views (JSP/XHTML pages). With "plain vanilla" JSP/Servlet you'll have to bring in a lot of code to control, preprocess, postprocess, gather data, validate, convert, listen, etc the HTTP request and response. And then I'm not talking about refactoring it to a high (abstract) degree so that you can also end up the same way as JSF does (just a JavaBean class and a JSP/XHTML page per use case).

    I've posted a more detailed answer on the subject before here: What is the difference between JSF, Servlet and JSP?

提交回复
热议问题