2

Possible Duplicate:
What is the need of JSF. When UI can be achieved from css html javascript jQuery?

I'm learning JSF for the first time, and am just not seeing the inherent difference from JSP, besides (perhaps) a cleaner separation of presentation and business logic.

My understanding of JSF:

  • Client requests a JSF page
  • The FacesServlet (which comes with JSF) routes the request to a custom (written by the developer) JSF controller
  • JSF controller knows which models/views/beans to use to handle the request
  • JSF pages (.jsf), which contain a mixture of HTML, CSS, JS and special JSF tags are interrogated by the JSF controller, and used to generate HTML/CSS/JS code to be sent back to the client browser

My understanding of JSP:

  • Client requests a JSP page
  • web.xml routes the request to the correct controller/handler
  • Controller/handler determines which JSP file (.jsp) to use in the response
  • This JSP file contains a mixture of HTML, CSS, JS and special JSP tags that get interrogated and ultimately generate HTML/CSS/JS to be sent back to client browser

In both cases, you end up with intermingled client-side (HTML, CSS, JS) and Java code in the form of tag libraries.

  • How is JSF an improvement over JSP?
  • How is the JSF life cycle any different (really!) than JSP?

Thanks in advance!

Community
  • 1
  • 1
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756

0 Answers0